SkyRanger Posted March 12, 2012 Share Posted March 12, 2012 Having a problem since the time change of 1 hour. Times now show 2:08 when it is 3:08 I am using: date_default_timezone_set('EST'); date('g:i a'); Any way to fix this to show corrent time? Link to comment https://forums.phpfreaks.com/topic/258762-time-zone/ Share on other sites More sharing options...
Pikachu2000 Posted March 12, 2012 Share Posted March 12, 2012 You have it pinned to Eastern Standard Time. Use date_default_timezone_set('America/New_York'); Link to comment https://forums.phpfreaks.com/topic/258762-time-zone/#findComment-1326514 Share on other sites More sharing options...
The Little Guy Posted March 12, 2012 Share Posted March 12, 2012 PHP should be set in "UTC" echo date("g:i a", strtotime("-5 hours")); Link to comment https://forums.phpfreaks.com/topic/258762-time-zone/#findComment-1326515 Share on other sites More sharing options...
SkyRanger Posted March 12, 2012 Author Share Posted March 12, 2012 Thanks Pikachu2000 that fixed the problem. Link to comment https://forums.phpfreaks.com/topic/258762-time-zone/#findComment-1326517 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.