how to convert a GMT datetime to local datetime?
Posted: Fri Apr 11, 2008 1:48 pm
For example:
I got a GMT datetime using : $gmdate = gmdate("Y-m-d H:i");
and then I could save this string into database as a timestamp, however when I show this timestamp on Web, I prefer to show the timestamp in local time, is there some function in php for this purpose? If the function already takes day time saving into account, that would be great.
I got a GMT datetime using : $gmdate = gmdate("Y-m-d H:i");
and then I could save this string into database as a timestamp, however when I show this timestamp on Web, I prefer to show the timestamp in local time, is there some function in php for this purpose? If the function already takes day time saving into account, that would be great.