Re: Time Zone Fix Support Thread
Quote:
Originally Posted by
Woodymon
Thanks, meant to put a ? mark at end of my last sentence. So in my admin orders page Paypal is showing the correct Pacific time in it's time stamps, but the Zen Cart comment entries shows two hours ahead (Central time) for its time stamps. And so I uploaded the time-zone_fix.php in the two respective directories
putenv ('TZ=America/Los_Angeles');
but still see the timestamps in admin -> orders off by two hours.
When you are in the admin is the time and date correctly shown in the header?
When you look at admin->version
Is the "Server Date" and "Database Date" the same as each other?
and are they correct?
Quote:
Originally Posted by
Woodymon
1. What does the Time Zone Offset entry in Admin >Config > MyStore suppose to do? Is that a stock zc 1.51 configuration entry? Or something leftover in the database from a previous time zone offset mod install (upgraded the zc db from 1.37 to 1.51)?
I entered "-2" in the form but appears to not be doing anything. Within phpmyadmin I don't see any function associated with that entry in the configuration table.
This is leftover from the previous "Time Zone Offset" mod. It does nothing. It can stay there without affecting anything.
Quote:
Originally Posted by
Woodymon
2. query_factory.php Line 71 shows the following code. What is the function of "-2" in that line? Is that a hardcoded offset? Pretty certain this is the stock zc1.51 file.
Code:
if (getenv('TZ') && !defined('DISABLE_MYSQL_TZ_SET')) @mysql_query("SET time_zone = '" . substr_replace(date("O"),":",-2,0) . "'", $this->link);
This converts the system php date() (which has to be correct first) into a form that is used to set the mysql time zone.
Re: Time Zone Fix Support Thread
I spoke to soon. All timestamps are now in alignment and showing Pacific TZ. Thanks for the info Gilby.
Re: Time Zone Fix Support Thread
Will this work fine for v1.5? I am in the PST/GMT-8 time and my shop is apparently 8 hours ahead of me (I guess that would make it GMT+0). I hope this mod will fix the fact that my sales always end 8 hours too early..?
Re: Time Zone Fix Support Thread
Quote:
Originally Posted by
meljen
Will this work fine for v1.5? I am in the PST/GMT-8 time and my shop is apparently 8 hours ahead of me (I guess that would make it GMT+0). I hope this mod will fix the fact that my sales always end 8 hours too early..?
See Posts 64 and 65
The query factory part is built in to 1.5.0 and 1.5.1
DON'T upload that file of this mod.
The "other" 2 files with the TZ variables are what you need.
Re: Time Zone Fix Support Thread
I was looking for an update to this file. Have since discovered that with version 1.5.4 + of Zen Cart to make you zone the one where you are situated (and not where your site server is located) the solution is simple. For earlier versions still look at this line:
https://www.zen-cart.com/showthread....2Btime+%2Bzone
As mentioned I am using 1.5.4, so all I needed to do was:
a) Open /includes/extra_configures/set_time_zone.php
b) Go to the following line:
c) $TZ = ‘’; // eg: ‘Europe/Oslo’
d) Change to:
e) $TZ = ‘Australia/Melbourne’; // eg.’Europe/Oslo’
f) Upload the file
Use the following to find you location:
http://php.net/manual/en/timezones.php
I hope this saves at least one person a lot of time!
Re: Time Zone Fix Support Thread
Quote:
Originally Posted by
anthonyh
I was looking for an update to this file. Have since discovered that with version 1.5.4 + of Zen Cart to make you zone the one where you are situated (and not where your site server is located) the solution is simple. For earlier versions still look at this line:
https://www.zen-cart.com/showthread....2Btime+%2Bzone
As mentioned I am using 1.5.4, so all I needed to do was:
a) Open /includes/extra_configures/set_time_zone.php
b) Go to the following line:
c) $TZ = ‘’; // eg: ‘Europe/Oslo’
d) Change to:
e) $TZ = ‘Australia/Melbourne’; // eg.’Europe/Oslo’
f) Upload the file
Use the following to find you location:
http://php.net/manual/en/timezones.php
I hope this saves at least one person a lot of time!
With Zen v1.5.4
Be sure that you don't alter the admin side files (because that set_time_zone.php file is automatically used by both the admin and non-admin).
Re: Time Zone Fix Support Thread
After doing this fix the invoices and packing slips continue showing server time. Is there a way to solve this?
Re: Time Zone Fix Support Thread
Quote:
Originally Posted by
ideasgirl
After doing this fix the invoices and packing slips continue showing server time. Is there a way to solve this?
What version of Zen-Cart?
Which version of this mod?
What does Admin-Version "Server Date" and "Database Date" show for the time? (They should be the same)
What is shown in the Admin header for the date/time?
These 3 should ALL show the new date and time
Re: Time Zone Fix Support Thread
Quote:
Originally Posted by
gilby
What version of Zen-Cart?
Which version of this mod?
What does Admin-Version "Server Date" and "Database Date" show for the time? (They should be the same)
What is shown in the Admin header for the date/time?
These 3 should ALL show the new date and time
ZC v1.5.1
TimeFix: Latest
Where do I see the "Database Date"? (Is that the one for example that shows on "date purchased"?)
The admin header time shows the date/time of customer as wanted.
When I do a backup with the MySql Backup it indicates the date/time correctly as the header.
I will recheck the issue with the customer again, since I haven't got the confirmation yet that he continues having the issue.
Re: Time Zone Fix Support Thread
Quote:
Originally Posted by
ideasgirl
ZC v1.5.1
TimeFix: Latest
Where do I see the "Database Date"? (Is that the one for example that shows on "date purchased"?)
The admin header time shows the date/time of customer as wanted.
When I do a backup with the MySql Backup it indicates the date/time correctly as the header.
I will recheck the issue with the customer again, since I haven't got the confirmation yet that he continues having the issue.
Admin->Version will show a line like
Server Date: 07/05/2015 11:43:56 Database Date: 07/05/2015 11:43:56
As the admin shows the correct date/time then we know that PHP has the correct time
The core 1.5.1 code will take this and set the Database Time, (assuming you haven't altered the default query_factory.php)
The mod won't fix any date/times on orders that are already in the database
It will only "fix" new orders placed after the mod is added