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