Zen Cart Logo
Forums / General Questions / Order timestamp doesn't match server time even though the timezone is correct

Order timestamp doesn't match server time even though the timezone is correct

Views: 3,295

Results 21 to 33 of 33
2 Jul 2014, 1:22 AM
#21
benxp avatar

benxp

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

2 Jul 2014, 1:24 AM
#22
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Order timestamp doesn't match server time even though the timezone is correct

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 ...

2 Jul 2014, 1:29 AM
#23
benxp avatar

benxp

New Zenner

Join Date:
Jul 2005
Posts:
43
Plugin Contributions:
0

Re: Order timestamp doesn't match server time even though the timezone is correct

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);

2 Jul 2014, 1:36 AM
#24
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Order timestamp doesn't match server time even though the timezone is correct

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 ...

2 Jul 2014, 1:46 AM
#25
benxp avatar

benxp

New Zenner

Join Date:
Jul 2005
Posts:
43
Plugin Contributions:
0

Re: Order timestamp doesn't match server time even though the timezone is correct

Wed, 02 Jul 2014 13:46:17 +1200GMT on the top of Admin menu

2 Jul 2014, 1:58 AM
#26
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Order timestamp doesn't match server time even though the timezone is correct

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?

2 Jul 2014, 2:30 AM
#27
benxp avatar

benxp

New Zenner

Join Date:
Jul 2005
Posts:
43
Plugin Contributions:
0

Re: Order timestamp doesn't match server time even though the timezone is correct

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??

2 Jul 2014, 2:37 AM
#28
benxp avatar

benxp

New Zenner

Join Date:
Jul 2005
Posts:
43
Plugin Contributions:
0

Re: Order timestamp doesn't match server time even though the timezone is correct

LOL, problem solved!! Sorry linda, it is total my mistake. The problem solved after I change that name to set_time_zone.php!!!

2 Jul 2014, 2:44 AM
#29
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Order timestamp doesn't match server time even though the timezone is correct

I may need to shoot you ... or me for not noticing ... :cry:

Gads ... thanks for catching that ... went right over my head too ... thud

2 Jul 2014, 3:24 AM
#30
benxp avatar

benxp

New Zenner

Join Date:
Jul 2005
Posts:
43
Plugin Contributions:
0

Re: Order timestamp doesn't match server time even though the timezone is correct

Linda, you are always the best!!!

2 Jul 2014, 4:40 AM
#31
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Order timestamp doesn't match server time even though the timezone is correct

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:

8 Jul 2014, 5:20 PM
#32
dclopez avatar

dclopez

New Zenner

Join Date:
Jun 2010
Posts:
7
Plugin Contributions:
0

Re: Order timestamp doesn't match server time even though the timezone is correct

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?

8 Jul 2014, 6:10 PM
#33
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Order timestamp doesn't match server time even though the timezone is correct

Check your server time in the Zen Cart Admin in the header ...

If it is off, tell your hosting provider to fix it ... :lookaroun