php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33682 The function localtime() don't work as expected
Submitted: 2005-07-13 20:29 UTC Modified: 2005-07-13 21:25 UTC
From: v1d4l0k4 at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.0.4 OS: Windows XP SP2
Private report: No CVE-ID: None
 [2005-07-13 20:29 UTC] v1d4l0k4 at gmail dot com
Description:
------------
The function localtime() don't work as expected. In the manual says that the key associative tm_year shows the year since 1900.

But, if year is higher than 2000, this key associative represents the year - 1900, or either, a hundred and few.

Reproduce code:
---------------
<?

print_r(localtime());

?>

Expected result:
----------------
I expect that the key associative tm_year represents 2005, no 105.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-13 20:57 UTC] derick@php.net
How much is 2005 - 1900? Exactly, 105. There is no bug here and the manual clearly describes that it's year - 1900.
 [2005-07-13 21:25 UTC] v1d4l0k4 at gmail dot com
Oh !

Excuse-me then ... I'm Brazilian and I check the pt-BR manual. In our language of manual, this don't be explicity, only cite that tm_year is since 1900, don't have examples ... what takes them tm_year is higher than 1900 ...

Anyway, very thanks for you ! ;)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 22:01:31 2024 UTC