#34571 [Opn->Fbk]: strptime cannot parse %z
| From: | derick@php.net | Date: | Wed, 21 Sep 2005 07:24:52 +0000 |
| Subject: | #34571 [Opn->Fbk]: strptime cannot parse %z | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-85325@lists.php.net to get a copy of this message | ||
ID: 34571
Updated by: derick@php.net
Reported By: o dot persson at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: Debian GNU/Linux
PHP Version: 5.1.0RC1
Previous Comments:
------------------------------------------------------------------------
[2005-09-21 09:24:40] derick@php.net
Works fine here with 5.1.0RC2 and 6.0.0dev:
array(9) {
["tm_sec"]=>
int(16)
["tm_min"]=>
int(23)
["tm_hour"]=>
int(9)
["tm_mday"]=>
int(21)
["tm_mon"]=>
int(8)
["tm_year"]=>
int(105)
["tm_wday"]=>
int(3)
["tm_yday"]=>
int(263)
["unparsed"]=>
string(4) "CEST"
}
perhaps you have an old glibc, which one do you use? Also, try the
latest snapshot off http://snaps.php.net.
------------------------------------------------------------------------
[2005-09-21 03:49:45] o dot persson at gmail dot com
Description:
------------
It doesn't work with %z. %Z, or no %z works.
Reproduce code:
---------------
<?php
$format = '%Y-%m-%d %H:%M:%S %Z';
$strf = strftime($format);
var_dump(strptime($strf, $format));
?>
Expected result:
----------------
An array with the date parsed.
Actual result:
--------------
False.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34571&edit=1