Time Zone Fix Support Thread
This is the official support thread for this new mod.
This mod is available for download here: Time Zone Fix
This module allows you to set the Server PHP and MySql time zone to your local time zone in your Zen-Cart website, if you are in a situation where your store is in a different time zone from the server on which it is hosted. (For example, your store is based in Australia but is hosted on a server in the USA.)
This module replaces the previous Time Zone Offset mod.
Much simpler and overwrites only 1 core file.
When working it fixes all known Time Zone problems.
Re: Time Zone Fix Support Thread
Cheers Gilby
Works perfectly for me
Thanks
Re: Time Zone Fix Support Thread
Quote:
Originally Posted by
nigelt74
Cheers Gilby
Works perfectly for me
Thanks
Good to hear.
And, Thanks for testing the beta version for me last year
Re: Time Zone Fix Support Thread
Gilby,
noticed this change from the beta and the new version
Beta Version
PHP Code:
// begin mod to set mysql timezone (gilby)
if (getenv('TZ')) {
@mysql_query("SET time_zone = '" . substr_replace(date("O"),":",-2,0) . "'", $this->link);
}
// end mod to set mysql timezone (gilby)
New Version
PHP Code:
// begin mod to set mysql timezone (gilby)
@mysql_query("SET time_zone = '" . substr_replace(date("O"),":",-2,0) . "'", $this->link);
// end mod to set mysql timezone (gilby)
Will this make any difference to how things work.
Re: Time Zone Fix Support Thread
Quote:
Originally Posted by
clydejones
Gilby,
noticed this change from the beta and the new version
Beta Version
PHP Code:
// begin mod to set mysql timezone (gilby)
if (getenv('TZ')) {
@mysql_query("SET time_zone = '" . substr_replace(date("O"),":",-2,0) . "'", $this->link);
}
// end mod to set mysql timezone (gilby)
New Version
PHP Code:
// begin mod to set mysql timezone (gilby)
@mysql_query("SET time_zone = '" . substr_replace(date("O"),":",-2,0) . "'", $this->link);
// end mod to set mysql timezone (gilby)
Will this make any difference to how things work.
No it won't
The beta version just checked that you had indeed set the TZ variable, hopefully to your local time.
Removing that test still sets the mysql time to be the same as the php time.
I used the TZ variable as it is a backwardly supported way to set the php time.
In future you may in php5.3 set the php time a different way.
If you do then the mysql time will still be updated.
Re: Time Zone Fix Support Thread
Quote:
Originally Posted by
gilby
No it won't
The beta version just checked that you had indeed set the TZ variable, hopefully to your local time.
Removing that test still sets the mysql time to be the same as the php time.
I used the TZ variable as it is a backwardly supported way to set the php time.
In future you may in php5.3 set the php time a different way.
If you do then the mysql time will still be updated.
OK. Many thanks.
Re: Time Zone Fix Support Thread
Hi, just wanted to add my thanks for this mod. An elegant solution and much appreciated.
Re: Time Zone Fix Support Thread
Yep, works like a charm. Thanks for your contribution!
Re: Time Zone Fix Support Thread
Is very good and easy. Many thanks
Re: Time Zone Fix Support Thread
this is straight-forward excellent mod for the timezone fix. :smile: