From 3f298968083429ae8af54cf78f751ddc133f61c6 Mon Sep 17 00:00:00 2001 From: stekkel Date: Wed, 5 May 2004 00:29:46 +0000 Subject: [PATCH] fix, when you compare 2 timestamps, make sure you correct both timestamps 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/date.php b/functions/date.php index c6b5db95..82190a0f 100644 --- a/functions/date.php +++ b/functions/date.php @@ -342,11 +342,14 @@ function getDateString( $stamp ) { $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; - $nextmid = $midnight + 86400; + $nextmid = $midnight + 86400 - $dateZ; if (($show_full_date == 1) || ($nextmid < $stamp)) { $date_format = _("M j, Y"); -- 2.25.1