Fixed bug that would cause e-mails dated in the future to be displayed with
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 16 Jul 2003 06:36:07 +0000 (06:36 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 16 Jul 2003 06:36:07 +0000 (06:36 +0000)
only the time.

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

ChangeLog
functions/date.php

index afb3bcf1df93b4fa848eb303263c3d9fa8dda960..498f9f52800538111175130886e2d5781e7732cd 100644 (file)
--- 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 ***
index 757f34ff354560f51601c96033e268d36b13ccbd..450d036e34960471f65b10f4245b5a6fa2f08761 100644 (file)
@@ -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 */