note 43921 added to function.gmdate
| From: | Kogikinc dot --info at kogik dot com | Date: | Thu, 08 Jul 2004 18:35:14 +0000 |
| Subject: | note 43921 added to function.gmdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72887@lists.php.net to get a copy of this message | ||
Wath out for summer time and winter time...
If you want to get the current date and time based on GMT you could use this :
$timezone = -5; //(GMT -5:00) EST (U.S. & Canada)
echo gmdate("Y/m/j H:i:s", time() + 3600*($timezone+date("I")));
this would gives: 2004/07/8 14:35:19 in summer time
and 2004/07/8 13:35:19 in winter time.
Note that date("I") returns 1 in summer and 0 in winter.
----
Manual Page -- http://www.php.net/manual/en/function.gmdate.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43921
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43921&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43921&report=yes
Search -- http://master.php.net/manage/user-notes.php