From 7e27023f289496057989a09dc16bc04365df9f0f Mon Sep 17 00:00:00 2001 From: jangliss Date: Wed, 16 Jul 2003 06:36:07 +0000 Subject: [PATCH 1/1] Fixed bug that would cause e-mails dated in the future to be displayed with only the time. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5321 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ functions/date.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index afb3bcf1..498f9f52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -52,6 +52,8 @@ Version 1.5.0 -- CVS of cyrus. (#766577). - Added feature to allow user to switch on full date display in mailboxes instead of just partial date/time based on time of email, and current date. + - Fixed bug that would cause e-mails dated in the future to be displayed with only + the time. ************************************** *** SquirrelMail Stable Series 1.4 *** diff --git a/functions/date.php b/functions/date.php index 757f34ff..450d036e 100644 --- a/functions/date.php +++ b/functions/date.php @@ -294,8 +294,9 @@ function getDateString( $stamp ) { $dateZ = - $dateZ; } $midnight = $now - ($now % 86400) - $dateZ; + $nextmid = $midnight + 86400; - if ($show_full_date == 1) { + if (($show_full_date == 1) || ($nextmid < $stamp)) { $date_format = _("M j, Y"); } else if ($midnight < $stamp) { /* Today */ -- 2.25.1