Page 1 of 1

server time

Posted: Mon Oct 03, 2011 9:57 am
by daijames
Hi
I am trying to allow an offset for my server time which is EDT and runs 5 hours behind mine (GMT/UTC)
I find I can alter the time by adding

Code: Select all

date_default_timezone_set('Europe/London');
in each script
or adding :
php_Value date.timezone US/New York or SetEnv TZ Europe/London to my .htaccess file
HOWEVER the time I am getting is 12 hours behind I cannot understand this ???
so for example my time is say 15.00h my server time shows 10.00 and when I try and change it the result is 03.00h

Re: server time

Posted: Tue Oct 04, 2011 1:21 am
by Dodon
What script you use to get the time? since 03.00 pm is the same as 15.00.

try:

Code: Select all

date("H:i:s");
 
note the capital H, which indicates a 24h time format