Przeglądaj źródła

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

Pontus Ullgren 23 lat temu
rodzic
commit
9703de694c
1 zmienionych plików z 3 dodań i 2 usunięć
  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 {