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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: v1d4l0k4 at gmail dot com
New email:
PHP Version: OS:

 

 [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 19:01:30 2024 UTC