php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1646 getdate - "hours" doesn't work correclty
Submitted: 1999-07-01 12:25 UTC Modified: 1999-07-02 13:20 UTC
From: mausz at flying-dog dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.11 OS: Windows (maybe Unix too)
Private report: No CVE-ID: None
 [1999-07-01 12:25 UTC] mausz at flying-dog dot com
$d=getdate(0);
$hour=$d["hours"];
echo "hour:  $hour ";

results in "hour: 1" instead of 0 (because of January 1 1970 00:00:00 GMT)
The "hours"-value is always to high (one hour).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-02 13:20 UTC] markonen at cvs dot php dot net
The date/time information returned by getdate() refer to your local time, whereas the unix timestamp started ticking at midnight GMT. Thus, getdate() is returning accurate information for your CET locale.

Marko
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 23:01:32 2024 UTC