View Full Version : date > O
checking the date() function (http://www.php.net/manual/en/function.date.php), i have found the O (Difference to Greenwich time (GMT) in hours) thing, but it dosn't explain how to use it.
any help?
mmm... what i meant.
can i use O to change the time zone by using date?
thanks
Celtboy
01-11-2004, 04:37 AM
If you use the following on a server here in Virginia, USA (GMT -5):
<?php
echo date("O");
?>
the output (to the screen) is this:
-0500
does that help?
ReadMe.txt
01-11-2004, 02:30 PM
i find that
gmdate('d/m/y g:ia',time()+($offset*3600));
works for me, where offset it the number of hours from GMT.
oh thanks a lot ReadMe text file! (lol)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.