Fixed bug that would cause e-mails dated in the future to be displayed with
[squirrelmail.git] / functions / date.php
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 */