New Zenner
- Join Date:
- Jul 2005
- Posts:
- 43
- Plugin Contributions:
- 0
Order timestamp doesn't match server time even though the timezone is correct
Sure. admin name /includes/extra_configures/use_catalog_time_zone.php
Views: 3,295
New Zenner
Sure. admin name /includes/extra_configures/use_catalog_time_zone.php
Oba-san
And again for giggles and grins ... in the Developer's Tool Kit can you do a search on:
$TZ
for both Catalog/Admin and again if secret admin directory is displayed, then mask the secret admin name ...
New Zenner
There is two place.
First file-------------------------------------------------------------------------
includes/classes/class.phpmailer.php
Line #1422 : $tz = date("Z");
Line #1423 : $tzs = ($tz < 0) ? "-" : "+";
Line #1424 : $tz = abs($tz);
Line #1425 : $tz = ($tz/3600)*100 + ($tz%3600)/60;
Line #1426 : $result = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz);
Second file--------------------------------------
includes/extra_configures/set_time_zone.php.php
Line #13 : $TZ = 'Pacific/Auckland'; // eg: 'Europe/Oslo' Auckland is my local time zone
Line #23 : if ($TZ == '') {
Line #24 : $TZ = date_default_timezone_get();
Line #26 : if ($TZ != '') {
Line #27 : putenv('TZ=' . $TZ);
Line #28 : @date_default_timezone_set($TZ);
Oba-san
And right now in the Pacific/Auckland it is about 07/02/2014 13:37:18, correct? And this is what you see in your Admin menu ...
New Zenner
Wed, 02 Jul 2014 13:46:17 +1200GMT on the top of Admin menu
Oba-san
Another chuckles and grins thing for the Developer's Tool Kit ... search for:
date_default_timezone_set
in the Catalog/Admin ... does just the one come up in:
/includes/extra_configures/set_time_zone.php
correct?
Do you have any plug-ins in the Admin?
What this a clean install of v1.5.1 or is this an upgrade?
New Zenner
Yes, only 1 from includes/extra_configures/set_time_zone.php.php . v1.5.1 is clean installed. We installed Easy poluplation, image handler and zenlight box...but there is no plugin for timezone setting.
why it is set_time_zone.php.php , it looks like I set up the wrong name??
New Zenner
LOL, problem solved!! Sorry linda, it is total my mistake. The problem solved after I change that name to set_time_zone.php!!!
Oba-san
I may need to shoot you ... or me for not noticing ... :cry:
Gads ... thanks for catching that ... went right over my head too ... thud
New Zenner
Linda, you are always the best!!!
Oba-san
The reason it worked on the Catalog side is that the auto-loading directory looks for files ending in .php so it actually loaded the file ...
However, the call to the specific name of:
include (DIR_FS_CATALOG . '/includes/extra_configures/set_time_zone.php');
made the call fail and since an include was used it did not trigger the debug logging ... had that been a require you would have had errors ...
Tricky how that works, eh? :blink:
New Zenner
This was great info. I used this and it worked great, the only issue I noticed was that the minutes are off by about 9 minutes. Has this issue been seen before?
Oba-san
Check your server time in the Zen Cart Admin in the header ...
If it is off, tell your hosting provider to fix it ... :lookaroun
Tell staff why this post should be reviewed.