浏览代码

made some changes to date parsing trying to fix bugs

Luke Ehresman 25 年之前
父节点
当前提交
f0fc78ac9f
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      functions/date.php

+ 5 - 1
functions/date.php

@@ -66,7 +66,11 @@
          $gmt = "+0100";
          $gmt = "+0100";
       else if ($gmt == "MET DST" || $gmt == "METDST")
       else if ($gmt == "MET DST" || $gmt == "METDST")
          $gmt = "+0200";
          $gmt = "+0200";
+      
+      if ($gmt = "")
+         $gmt = "+0000";
 
 
+      /*
       if (substr($gmt, 0, 1) == "-") {
       if (substr($gmt, 0, 1) == "-") {
          $neg = true;
          $neg = true;
          $gmt = substr($gmt, 1, strlen($gmt));
          $gmt = substr($gmt, 1, strlen($gmt));
@@ -82,10 +86,10 @@
          $gmt = "-$gmt";
          $gmt = "-$gmt";
       else
       else
          $gmt = "+$gmt";
          $gmt = "+$gmt";
+      */
 
 
       /** now find what the server is at **/
       /** now find what the server is at **/
       $current = date("Z", time());
       $current = date("Z", time());
-
       $stamp = (int)$stamp - (int)$gmt + (int)$current;
       $stamp = (int)$stamp - (int)$gmt + (int)$current;
 
 
       return $stamp;
       return $stamp;