Re: date function
| From: | Jordi Canals | Date: | Sun, 19 Sep 2004 14:22:10 +0000 |
| Subject: | Re: date function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197182@lists.php.net to get a copy of this message | ||
On Sun, 19 Sep 2004 14:29:54 +0300, Magdy <majdi@info-win.com> wrote:
> my problem is with date( ) function which is display a GMT time which is different from my zone
> with 3 hours,,,how can i correct this.
The date() function, gets the system current date/time if you don't
pass the second parameter. So, change the system time or give the
second parameter with a correct date.
You can use also the mktime() function to calculate a new date/time
for your zone.
Not tested, but something like that could work:
date('Y-m-d H:i', mktime(date(H), date(i), date(m), date(d), date(Y));
Regards,
Jordi.