forumnz Posted May 18, 2009 Share Posted May 18, 2009 Hey! I have dates in my database (datetime) like 2009-04-30 20:45:45. This is fine, however the time is 17 hours behind the time in my country.. how can I easily modify this each time I retrieve these dates from the database? Thanks Sam Link to comment https://forums.phpfreaks.com/topic/158558-change-time-in-php/ Share on other sites More sharing options...
Masna Posted May 18, 2009 Share Posted May 18, 2009 I'm not sure how to do it with DATETIME format, but you can do it very easily if you store a UNIX timestamp instead: $timestamp = {retrieve timestamp from MySQL database here}; $timestamp += (60*60*17); Link to comment https://forums.phpfreaks.com/topic/158558-change-time-in-php/#findComment-836262 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.