瀏覽代碼

Timezone fix for non-whole hour timezone problem. by Darryl Ross (modified by Pontus Ullgren)

Pontus Ullgren 23 年之前
父節點
當前提交
9703de694c
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      functions/date.php

+ 3 - 2
functions/date.php

@@ -58,9 +58,10 @@ function getGMTSeconds($stamp, $gmt) {
     } else {
         $neg = false;
     }
-    
+     
+    $difference = substr($gmt, 2, 2);
     $gmt = substr($gmt, 0, 2);
-    $gmt = $gmt * 3600;
+    $gmt = ($gmt + ($difference / 60)) * 3600;
     if ($neg == true) {
         $gmt = "-$gmt";
     } else {