php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #39137 Misleading description in date() doc
Submitted: 2006-10-12 14:10 UTC Modified: 2006-12-02 07:43 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: g1list_1a at marsdome dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
 [2006-10-12 14:10 UTC] g1list_1a at marsdome dot com
Description:
------------
The documentation for the date() function says "using the given integer timestamp or the current local time if no timestamp is given."  But in fact, it's not the current local time being passed in, since timestamps are always UTC regardless of your location or timezone.  The documentation for the time() function gets this correct, since it never uses the word "local."

What it should say is

"...using the given integer timestamp or the current local time if no timestamp is given.  The output is formatted based on the current default time zone."

It would also help if Example 1 changed the default time zone, so that the different results could be shown for the same input.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-02 07:43 UTC] bjori@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 20:00:02 2025 UTC