Re: gmdate problem
| From: | Eugene Lee | Date: | Tue, 21 Oct 2003 06:52:17 +0000 |
| Subject: | Re: gmdate problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166909@lists.php.net to get a copy of this message | ||
On Tue, Oct 21, 2003 at 12:44:38PM +0800, irinchiang@justeducation.com wrote:
:
: Having some problem with 'gmdate' here. However, the time doesn't
: match with the current time on the system. What could be the problem?
: Do I have to set any timezone or stuff like that?...Hope to get some
: help here.
:
: Tue, 21st Oct 2003, 04:25
:
: <?php
: echo gmDate("D, dS M Y, H:i");
: ?>
gmdate() returns the the GMT/UTC time (i.e. timezone 0). Unless your
system's timezone is zero because it is in Greenwich, gmdate() does not
adjust its result to your local timezone and you will not get the answer
you expected. What's wrong with date()?