fix, when you compare 2 timestamps, make sure you correct both timestamps
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 5 May 2004 00:29:46 +0000 (00:29 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 5 May 2004 00:29:46 +0000 (00:29 +0000)
with the timezone

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7381 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/date.php

index c6b5db95be3318d3edfb5b679a0fedc8f65dd9a9..82190a0f66eec7ac974dbae9002ff3d85ac70052 100644 (file)
@@ -342,11 +342,14 @@ function getDateString( $stamp ) {
     $now = time();
     
     $dateZ = date('Z', $now );
     $now = time();
     
     $dateZ = date('Z', $now );
+
+    // FIXME: isn't this obsolete and introduced as a terrible workaround
+    // for bugs at other places which are fixed a long time ago? 
     if ($invert_time) {
         $dateZ = - $dateZ;
     }
     $midnight = $now - ($now % 86400) - $dateZ;
     if ($invert_time) {
         $dateZ = - $dateZ;
     }
     $midnight = $now - ($now % 86400) - $dateZ;
-    $nextmid = $midnight + 86400;
+    $nextmid = $midnight + 86400 - $dateZ;
     
     if (($show_full_date == 1) || ($nextmid < $stamp)) {
         $date_format = _("M j, Y");
     
     if (($show_full_date == 1) || ($nextmid < $stamp)) {
         $date_format = _("M j, Y");