php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26857 date("H:i:s") or date("G:i:s") doesn't return correct time
Submitted: 2004-01-10 06:09 UTC Modified: 2004-01-10 20:17 UTC
From: ignatius at act28 dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.4 OS: win XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ignatius at act28 dot com
New email:
PHP Version: OS:

 

 [2004-01-10 06:09 UTC] ignatius at act28 dot com
Description:
------------
Not sure if it's my setup or what, but php4.3.4 on Windows XP, Apache 2.0.48 - date("H:i:s") or date("G:i:s") doesn't return the correct hour in 24 hour format.

For some reason, 17:15:00 becomes 07:15:00
and so on....



Reproduce code:
---------------
print date('H:i:s');
print date('G:i:s');

Expected result:
----------------
Well, it depends on what time it is doesn't it? :-)
Er.. it is now 17:21:34 according to my system clock


Actual result:
--------------
07:21:34


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-10 20:17 UTC] sniper@php.net
Must be your machine that is very wrong. (possibly timezone is  totally wrong one). Can not reproduce with working setup.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Dec 12 18:00:01 2025 UTC