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! Quote Link to comment Share on other sites More sharing options...
duckmannz Posted July 1, 2007 Author Share Posted July 1, 2007 *bump* Anyone? ??? Quote Link to comment 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? Quote Link to comment 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! Quote Link to comment 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.