Page 1 of 1

time problem

Posted: Tue Sep 09, 2008 4:32 am
by itsmani1
I am having time problem with server.
When i tired following code it says:
09/09/2008 14:30:03

Code: Select all

$format = '%d/%m/%Y %H:%M:%S';
$strf = strftime($format);
 
But when i login to server it says:
Tue Sep 9 15:26:40 2008

why is this difference of one hour? any idea?

thank you

Re: time problem

Posted: Tue Sep 09, 2008 5:13 am
by shaneiadt
Maybe try using the date() function and see if it makes a difference;

Code: Select all

[size=150]echo date("H:i:s");  // will output 17:16:17[/size]
http://ie.php.net/date

Re: time problem

Posted: Tue Sep 09, 2008 5:18 am
by jayshields
It's probably because your server timezone is different to the other servers timezone.