php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #725 gmdate returns date that is 12 hours off (from west of GMT)
Submitted: 1998-09-06 13:56 UTC Modified: 1998-09-07 11:57 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: cooper at cooper8 dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.3 OS: BSD/OS 3.0, SunOS 5.5.1
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: cooper at cooper8 dot com
New email:
PHP Version: OS:

 

 [1998-09-06 13:56 UTC] cooper at cooper8 dot com
The script that produces the problem for me:
<? system('date') ?>
<p>

<? system('date -u') ?>
<p>

<? print date('l, d-M-y h:i:s') ?>
<p>

<? print gmdate('l, d-M-y h:i:s') ?>
<p>

The output on my system (central daylight time):

Sun Sep 6 12:56:02 CDT 1998 

Sun Sep 6 17:56:02 GMT 1998 

Sunday, 06-Sep-98 12:56:02

Sunday, 06-Sep-98 05:56:02

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-09-07 11:57 UTC] jaakko
Use capital H to get hour 0..23,
use small h to get hour 1..12.

print gmdate('l, d-M-y H:i:s');


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 12:00:02 2026 UTC