mesh2005 Posted May 3, 2007 Share Posted May 3, 2007 I don't have a root access to change the local timezone of the server, currently it is set to PST and I want to get the time according to the US Central timezone. Someone told me that I need to call putenv("TZ=US/Central") before the date function is called but I want to know is there any better idea? Thank you Link to comment https://forums.phpfreaks.com/topic/49848-how-to-convert-the-current-time-to-us-central/ Share on other sites More sharing options...
SkyRanger Posted May 3, 2007 Share Posted May 3, 2007 You can try putting this at the top of your page: date_default_timezone_set('EST'); Just replace EST with whatever timezone you are in. Link to comment https://forums.phpfreaks.com/topic/49848-how-to-convert-the-current-time-to-us-central/#findComment-244545 Share on other sites More sharing options...
mesh2005 Posted May 3, 2007 Author Share Posted May 3, 2007 mm, I think this function is available in PHP 5 not 4, I'm using version 4 Link to comment https://forums.phpfreaks.com/topic/49848-how-to-convert-the-current-time-to-us-central/#findComment-244747 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.