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? Quote 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'); Quote 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")); Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/258762-time-zone/#findComment-1326517 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.