From a8538eda8587db8c703c9ce96c922b1b3a4be92d Mon Sep 17 00:00:00 2001 From: Bigsk Date: Wed, 16 Sep 2020 09:14:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E6=BA=90=E6=97=B6=E9=97=B4=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- time/api.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 time/api.php diff --git a/time/api.php b/time/api.php new file mode 100644 index 0000000..64d88ef --- /dev/null +++ b/time/api.php @@ -0,0 +1,23 @@ +=-12){ + $time_gap=$time-(60*60*8)+(60*60*$_GET['zone']); + }else{ + $error=true; + } + header("Content-type:application/json"); + if($error==true){ + echo '{"error":10004}'; + }else{ + echo '{"stamp":'.$time.',"year":'.date("Y",$time_gap).',"month":'.date("m",$time_gap).',"day":'.date("d",$time_gap).',"hour":'.date("H",$time_gap).',"minute":'.date("i",$time_gap).',"second":'.date("s",$time_gap).'}'; + } +} \ No newline at end of file