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? Quote 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.. Quote 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'); Quote 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'); Quote Link to comment https://forums.phpfreaks.com/topic/146071-solved-easy-date-question/#findComment-767084 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.