Bug #15115: strtotime not recognizing 'Sa' as Saturday
| From: | tim at x-session dot dynodns dot net | Date: | Sat, 19 Jan 2002 17:24:06 +0000 |
| Subject: | Bug #15115: strtotime not recognizing 'Sa' as Saturday | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-77529@lists.php.net to get a copy of this message | ||
From: tim@x-session.dynodns.net
Operating system: Win2000 Server
PHP version: 4.1.1
PHP Bug Type: Date/time related
Bug description: strtotime not recognizing 'Sa' as Saturday
What I do is parsing Mail-Headers, especially the 'Date:' header. One mail
I parsed had the following 'Date:' header:
Date: Sa, 19 Jan 2002 12:28:51 -1100
strtotime just returns -1 after parsing this string:
<?
$dheader="Sa, 19 Jan 2002 12:28:51 -1100";
echo strtotime($dheader); // prints '-1'
?>
when I replace 'Sa' with 'Sat', it returns the correct value:
<?
$dheader="Sat, 19 Jan 2002 12:28:51 -1100";
echo strtotime($dheader); // prints '1011482931'
?>
I am in Timezone GMT+1.
Now should I find a workaround to this problem by replacing 'Sa' with
'Sat' for myself (so this is a mailer-problem) or perhaps you should
consider this in your implementation (I don't know how often this
'Sa'/'Sat' problem occurs.
--
Edit bug report at: http://bugs.php.net/?id=15115&edit=1