...

View Full Version : date > O



MeGa
01-11-2004, 05:07 AM
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?

MeGa
01-11-2004, 05:09 AM
mmm... what i meant.

can i use O to change the time zone by using date?
thanks

Celtboy
01-11-2004, 05: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, 03: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.

MeGa
01-11-2004, 09:28 PM
oh thanks a lot ReadMe text file! (lol)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum