duckmannz Posted June 2, 2007 Share Posted June 2, 2007 Hi We have several LAMP servers across Australia and have a problem with our servers in Perth and Darwin where the time according to PHP is always 30 minutes behind the actual time. An example... Server is located in Darwin: CLI "date" returns "Sat Jun 2 18:53:32 CST 2007" MySQL "SELECT NOW();" returns "2007-06-02 18:54:48" And PHP "date('D d-M-Y H:i:s T')" returns "Sat 02-Jun-2007 18:26:07 EIT" Is there a simple reason for this? There is no DST for Darwin in 2007. Thanks! Link to comment https://forums.phpfreaks.com/topic/53968-timezone-issue-for-nt-wa-in-australia/ Share on other sites More sharing options...
duckmannz Posted July 1, 2007 Author Share Posted July 1, 2007 *bump* Anyone? ??? Link to comment https://forums.phpfreaks.com/topic/53968-timezone-issue-for-nt-wa-in-australia/#findComment-287081 Share on other sites More sharing options...
gerkintrigg Posted July 1, 2007 Share Posted July 1, 2007 errrrrrrr. if you know it's always 30 minutes behind, you can always account for it by adding the 30 minutes on in every script, but that sounds like a drag. You could set the system clock forward to the correct time if you have that kind of access. I think the reason that two methods are returning the different times is probably because you're hosting php and mysql on different servers. Do you own these servers or are they through a third party? Link to comment https://forums.phpfreaks.com/topic/53968-timezone-issue-for-nt-wa-in-australia/#findComment-287251 Share on other sites More sharing options...
duckmannz Posted July 2, 2007 Author Share Posted July 2, 2007 Both mysql and apache2 are on the same physical server and I'm the admin of the servers so I can try anything! Currently I'm putting date_default_timezone_set("Australia/Perth"); or date_default_timezone_set("Australia/Darwin"); to accomodate the difference but like you said -- that's messy! Link to comment https://forums.phpfreaks.com/topic/53968-timezone-issue-for-nt-wa-in-australia/#findComment-287791 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.