Fixed bug that would cause e-mails dated in the future to be displayed with
[squirrelmail.git] / functions / date.php
index 85a4cd6922fc4714c457fa88f4ffc11e842b7c56..450d036e34960471f65b10f4245b5a6fa2f08761 100644 (file)
@@ -281,7 +281,7 @@ function getLongDateString( $stamp ) {
 
 function getDateString( $stamp ) {
 
-    global $invert_time, $hour_format;
+    global $invert_time, $hour_format, $show_full_date;
 
     if ( $stamp == -1 ) {
        return '';
@@ -294,8 +294,11 @@ function getDateString( $stamp ) {
         $dateZ = - $dateZ;
     }
     $midnight = $now - ($now % 86400) - $dateZ;
+    $nextmid = $midnight + 86400;
     
-    if ($midnight < $stamp) {
+    if (($show_full_date == 1) || ($nextmid < $stamp)) {
+        $date_format = _("M j, Y");
+    } else if ($midnight < $stamp) {
         /* Today */
         if ( $hour_format == SMPREF_TIME_12HR ) {
             $date_format = _("g:i a");