DBookatay Posted February 20, 2009 Share Posted February 20, 2009 On my site it lists my business hours, and includes the current time: echo date('g:i a'); Problem is I just switched hosting companies and theres a 3 hour time difference now. I'm in in the Eastern Time Zone and they are in the Pacific Time Zone. How do I add the 3 hours to my code? Link to comment https://forums.phpfreaks.com/topic/146071-solved-easy-date-question/ Share on other sites More sharing options...
farkewie Posted February 20, 2009 Share Posted February 20, 2009 http://au2.php.net/timezones May be of interest.. Link to comment https://forums.phpfreaks.com/topic/146071-solved-easy-date-question/#findComment-766858 Share on other sites More sharing options...
JonnoTheDev Posted February 20, 2009 Share Posted February 20, 2009 i.e. date_default_timezone_set('America/Los_Angeles'); Link to comment https://forums.phpfreaks.com/topic/146071-solved-easy-date-question/#findComment-766936 Share on other sites More sharing options...
DBookatay Posted February 20, 2009 Author Share Posted February 20, 2009 Thank you, this is it: date_default_timezone_set('America/New_York'); echo date('g:i a'); Link to comment https://forums.phpfreaks.com/topic/146071-solved-easy-date-question/#findComment-767084 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.