Jump to content

Time incorrect due to new DST Change-over date.


Macka

Recommended Posts

Hi everyone,

 

I'm having problems with the date function in a PHP script, I believe this is due to daylightsavings time coming 4 weeks early this year.

 

I'm helping a school with their bulletin board system, which they have been running for a while now, late last year they had a problem with their time being consistently out by 1 hour (actually I have a feeling it was like that all year), I fixed this by adding a line to the top of the php script:

 

putenv("TZ Australia/Adelaide");

 

This fixed the time issue, until now.

 

The Time() function is again out by 1 hour and I believe this is due to DST starting 4 weeks early this year, and although this means the system will be back on track on the 31st of October, it would be nice if I could fix this perminantly for them.

 

From what the Administrator has told me, he installed XAMPP 1.1.2.0 which I discovered has PHP 4.3.3, which I believe is quite out of date. (http://www.officephp.com/?blog:xampp-php-and-mysql-versions:20080813051736480150)

 

What I want to know is if updating PHP to the latest release (5.2.6) will fix this issue and whether future DST date changes will cause the issue to reoccur.

 

The Admin is a bit warty of updating to the latest version of XAMPP and wants to avoid any unnecessary complications, hence it hasnt been updated since its initial install.

 

Also, if updating PHP will fix the issue, is there anything special that needs to be done eg uninstall the current PHP version and install the new version or download an upgrade version.

 

 

I dont do very much work with PHP at all, so any help will be greatly appreciated.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.