From:             [EMAIL PROTECTED]
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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to