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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 09:01:32 2024 UTC