|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15291 date() function time return problem
Submitted: 2002-01-30 01:38 UTC Modified: 2002-03-24 00:00 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: omid at oztell dot com Assigned:
Status: No Feedback Package: Date/time related
PHP Version: 4.1.1 OS: Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
47 - 9 = ?
Subscribe to this entry?

 [2002-01-30 01:38 UTC] omid at oztell dot com
The date() function is returning the value as GMT time. 
i.e this function and gmdate() produce the same result as 
of php 4.1.1. This was o.k in previous versions


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-30 01:54 UTC]
I cannot replicate this. I think your timezone settings may
be incorrect

[swm@l php-4.1.1]$ ./php
echo date('H');
17[swm@l php-4.1.1]# date
Wed Jan 30 17:51:27 EST 2002
[swm@l php-4.1.1]$ TZ=GMT ./php
echo date('H');
06[swm@l php-4.1.1]$

 [2002-01-30 02:08 UTC]
Reopening; this should be set to 'Feedback' until the user
confirms that the proposed fix actually works.

 [2002-01-30 02:20 UTC] omid at oztell dot com
I get the same result for the following:

echo date("r");
echo gmdate("r");
 [2002-01-30 02:37 UTC]
What do you get from doing the following at a command prompt?

% echo $TZ
% date
% TZ=GMT date

 [2002-01-30 14:51 UTC]
status -> feedback
 [2002-03-24 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-12-28 11:31 UTC] bbalasateesh at gmail dot com
date() and gmdate() is returning the same values for me. I am running my PHP project on 5.2.9 version on windows. Is this is bug or do I need to change any settings.

Thanks in advance,
Sateesh B.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Aug 03 23:01:23 2021 UTC