From 913ed9a34d5244ae4a74b3c2bb4892de17e38885 Mon Sep 17 00:00:00 2001 From: kink Date: Wed, 31 Jul 2002 12:05:31 +0000 Subject: [PATCH] If date can not be parsed, do not display date header at all (better than wrong date header) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3197 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/date.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/functions/date.php b/functions/date.php index a65308d6..c3790433 100644 --- a/functions/date.php +++ b/functions/date.php @@ -19,6 +19,12 @@ require_once( '../functions/constants.php' ); // corrects a time stamp to be the local time function getGMTSeconds($stamp, $gmt) { global $invert_time; + + // date couldn't be parsed + if ($stamp == -1) { + return -1; + } + if (($gmt == 'Pacific') || ($gmt == 'PST')) { $gmt = '-0800'; } else if (($gmt == 'EDT')) { @@ -179,6 +185,10 @@ function getLongDateString( $stamp ) { global $hour_format; + if ($stamp == -1) { + return ''; + } + if ( $hour_format == SMPREF_TIME_12HR ) { $date_format = _("D, F j, Y g:i a"); } else { -- 2.25.1