php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34571 strptime cannot parse %z
Submitted: 2005-09-21 03:49 UTC Modified: 2005-09-29 01:00 UTC
From: o dot persson at gmail dot com Assigned:
Status: No Feedback Package: Date/time related
PHP Version: 5.1.0RC1 OS: Debian GNU/Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: o dot persson at gmail dot com
New email:
PHP Version: OS:

 

 [2005-09-21 03:49 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-21 09:24 UTC] 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-29 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC