#47277 [Opn->Bgs]: strptime() returns invalid value for %y

From: Date: Mon, 02 Feb 2009 14:19:48 +0000
Subject: #47277 [Opn->Bgs]: strptime() returns invalid value for %y
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-133380@lists.php.net to get a copy of this message
 ID:               47277
 Updated by:       johannes@php.net
 Reported By:      stsung at mail dot ru
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: CentOS 5.2
 PHP Version:      5.2.8
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

.


Previous Comments:
------------------------------------------------------------------------

[2009-02-02 11:27:05] stsung at mail dot ru

Description:
------------
When strptime() is used with %y in format, it returns an invalid Year
in tm_year. 

Reproduce code:
---------------
$test = strptime('02-Feb-09 11:16:00', '%d-%b-%y %H:%M:%S');
echo $test['tm_year'];

Expected result:
----------------
2009

Actual result:
--------------
109


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47277&edit=1



Thread (2 messages)

« previous php.bugs (#133380) next »