php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16266 gmdate('U') is the same as date('U')
Submitted: 2002-03-25 14:06 UTC Modified: 2002-03-25 18:44 UTC
From: pcornelius at managestar dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.1.1 OS: Linux 2.4.2-2 i686
Private report: No CVE-ID: None
 [2002-03-25 14:06 UTC] pcornelius at managestar dot com
The gmdate() function returns the system's local time when used with the 'U' format option.  I've reproduced this on a couple of Linux systems (2.4.2 and 2.4.7 i686 systems).  Both of them function correctly when 'date' is called from the command line.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-25 18:44 UTC] pcornelius at managestar dot com
D'oh!  So it was my expectations that were broken, not the function.  Thanks to Brian Foddy for pointing out that Unix Epoch is seconds since Jan 1 1970, GMT so timezone is meaningless and date/gmdate are equivalent with 'U'.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC