Forums / All Other Contributions/Addons / Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

Views: 31,520

Results 101 to 120 of 140
5 Jul 2009, 5:58 AM
#101
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

ADE Cyber Emporium:

Hi All,

I have just installed the time offset mod.
when i go into my admin i have 3 error messages at the top of my screen in yellow that say

TIME ZONE OFFSET ERROR! Time Zone Offset is set to 0 Hours. The difference between Server & Database time is 17 Hours.
2009-07-05 10:41:54: TZ Server Time
2009-07-04 17:41:54: Offset Database Server Time:

So i go into the configuration/my store/time zone offset and edit the time to show +17 as my store is in Brisbane Australia and my server is some where in the USA, Click on update, Go do something else and then come back to configuration/my store/time zone offset and it is back at 0.

Can anyone help?

P.S. The time and date are correct within 5 Min's at the top of the page just under the zen cart icon.

:unsure:

As soon as you enter +17
It should immediately show the Time Offset as +17
The message at the top should disappear as well

If it doesn't show +17 as the offset then it is not being set correctly and you may have to reinstall the sql patch

5 Jul 2009, 7:29 AM
#102
ade_cyber_emporium avatar

ade_cyber_emporium

New Zenner

Join Date:
Mar 2009
Location:
Brisbane, Queensland, Australia
Posts:
31
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

Whenever i change the time offset it will allways go back to 0.

I tried to do the SQL Patch and got this message

1062 Duplicate entry 'TIME_ZONE_OFFSET' for key 2
in:
[INSERT INTO zen_configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Time Zone Offset', 'TIME_ZONE_OFFSET', '0', 'The time zone difference between your store and the server. Enter +h, 0 or -h where ''h'' is the number of hours. If your store time zone is ahead of the server time zone, use +', 1, 7, NULL, '0001-01-01 00:00:00', NULL, NULL);]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

How do i uninstall the patch and then reinstall the patch?
:lamo::no:

5 Jul 2009, 10:47 AM
#103
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

ADE Cyber Emporium:

Whenever i change the time offset it will allways go back to 0.

I tried to do the SQL Patch and got this message

1062 Duplicate entry 'TIME_ZONE_OFFSET' for key 2
in:
[INSERT INTO zen_configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Time Zone Offset', 'TIME_ZONE_OFFSET', '0', 'The time zone difference between your store and the server. Enter +h, 0 or -h where ''h'' is the number of hours. If your store time zone is ahead of the server time zone, use +', 1, 7, NULL, '0001-01-01 00:00:00', NULL, NULL);]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

How do i uninstall the patch and then reinstall the patch?
:lamo::no:

You will need to use phpmyadmin to remove this entry from the configuration table

Then run the sql again

PS: You are just entering the 3 characters +17 only
and not anything else??

7 Jul 2009, 11:55 AM
#104
kobra8 avatar

kobra8

Zen Follower

Join Date:
Mar 2009
Location:
Serbia
Posts:
350
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

To set the PHP time by adding the file
admin/includes/extra_configures/time_offset.php file

Change the line in the file from:
putenv ('TZ=Australia/Melbourne');
to reflect my time zone.
I em in Serbia, Belgreade. What is my TZ?
What to type in TZ=?

7 Jul 2009, 12:30 PM
#105
kobra8 avatar

kobra8

Zen Follower

Join Date:
Mar 2009
Location:
Serbia
Posts:
350
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

I got mesage in admin:
TIME ZONE OFFSET ERROR! Time Zone Offset is set 0 Hours. The difference between Server & Database is 13.906944444 Hours.
2009-07-07 22:12:41: TZ Server Time
2009-07-07 08:18:16: Offset Database Server Time:

My host is in US Hopkinsville, Kentucky
Im locate in Serbia, Belgrade.

Hay to manage thet problem?

7 Jul 2009, 2:36 PM
#106
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

kobra8:

I got mesage in admin:
TIME ZONE OFFSET ERROR! Time Zone Offset is set 0 Hours. The difference between Server & Database is 13.906944444 Hours.
2009-07-07 22:12:41: TZ Server Time
2009-07-07 08:18:16: Offset Database Server Time:

My host is in US Hopkinsville, Kentucky
Im locate in Serbia, Belgrade.

Hay to manage thet problem?

Looks like you found the correct TZ for your area

Set the Time Zone Offset to +13
Check the time difference

Also looks like your mysql server is on a different server to your website server.
The warning will constantly pop up as it seems there is 6 minutes difference between them.
Remove the last (optional) part of the mod that gives this warning

7 Jul 2009, 3:18 PM
#107
kobra8 avatar

kobra8

Zen Follower

Join Date:
Mar 2009
Location:
Serbia
Posts:
350
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

I make test shoping end geting

Wed Jul 8 2009 1:08:10 EST in meil
07/08/2009 00:12:43 in admin
Time Zone Offset +13
My time on comp. is 07.Jul 2009 17:15

Hay to fix thet?

1 Sep 2009, 3:45 PM
#108
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

Sorry, I've posted it in another topic.
However, I've just install this well contribution TZO
All works fine, but unfortunately the date in confirmation email is wrong. An today order show date tuesday 30 november 1999 :blink:
Thank you for support by developer.

3 Sep 2009, 2:02 PM
#109
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

For anyone in the UK trying to use this mod, I managed to get it working beautifully in 1.3.8a after a fair amount of head scratching.

You need to install exactly as per the readme.txt, then make sure you install the optional files as well.

With these optional files, you need to edit both of the time_offset.php files and change putenv ('TZ=Australia/Melbourne'); to putenv ('TZ=Europe/London');

This will get rid of the annoying yellow error messages across the top of the admin screen, so long as you've changed configuration>My Store to reflect the correct time that you are ahead of or behind your server location by.

Thanks for the upload and the time you've spent developing this mod... perfecto!

3 Sep 2009, 2:19 PM
#110
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

Hmmm, has anyone managed to get this working with the SuperTracker mod?

3 Sep 2009, 11:09 PM
#111
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

limelites:

Hmmm, has anyone managed to get this working with the SuperTracker mod?

Never used supertracker....

You need to find where the mod updates the database usually with "now()"

A quick look at the mod and I would start with includes\classes\supertracker.php

Search for the function call ```php
now()

```php
date_add(now(), INTERVAL " . TIME_ZONE_OFFSET . " HOUR)

Note that you do not need to replace all of the "now()" calls
Only the ones that update the database.
There is a function in that class called "update" which has a "now()" call.
Fixing that one might solve the problem for you.

3 Sep 2009, 11:22 PM
#112
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

100asa:

Sorry, I've posted it in another topic.
However, I've just install this well contribution TZO
All works fine, but unfortunately the date in confirmation email is wrong. An today order show date tuesday 30 november 1999 :blink:
Thank you for support by developer.

Make sure that you are using the correct version of this mod for the version of zen-cart that you are using.

Otherwise I suspect that one of the files has not uploaded correctly.

4 Sep 2009, 7:21 AM
#113
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

gilby:

Never used supertracker....

You need to find where the mod updates the database usually with "now()"

A quick look at the mod and I would start with includes\classes\supertracker.php

Search for the function call ```php
now()

> ```php
date_add(now(), INTERVAL " . TIME_ZONE_OFFSET . " HOUR)

Note that you do not need to replace all of the "now()" calls
Only the ones that update the database.
There is a function in that class called "update" which has a "now()" call.
Fixing that one might solve the problem for you.

Hi Gilby, Thanks for your help, but I'm afraid it's not working. I was trying a very similar statement yesterday and couldn't get it working and again today, changing NOW() to date_add(now(), INTERVAL " . TIME_ZONE_OFFSET . " HOUR_MINUTE) seems to make absolutely no difference at all. The file I changed is the supertracker.php in includes\classes.

I'm going to try completely uninstalling and re-installing. I notice the download files I had were supertracker_1-0. However, from the download area I've just discovered supertracker_1-0_Fix_20090925. I wonder if this could be causing the problems?

When I go to re-install, should I perhaps alter the sql patch so that the three references to NOW() change to something else?

4 Sep 2009, 8:34 AM
#114
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

Just as an update, I got the SuperTracker mod working perfectly at last. Re-installed what appears to be the latest version and then changed all referrences to NOW() in includes\classes\supertracker.php to **date_add(now(), INTERVAL " . TIME_ZONE_OFFSET . " HOUR) **. Thank you Gilby.

4 Sep 2009, 12:37 PM
#115
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

limelites:

Just as an update, I got the SuperTracker mod working perfectly at last. Re-installed what appears to be the latest version and then changed all referrences to NOW() in includes\classes\supertracker.php to **date_add(now(), INTERVAL " . TIME_ZONE_OFFSET . " HOUR) **. Thank you Gilby.

Yes this mod uses the HOUR define

(The HOUR_MINUTE define was used by a different version that needed to adjust to a half hour time zone difference)

Glad it all works.

4 Dec 2009, 1:36 AM
#116
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

I have install this contribution let say I live in Texas and my server is in Arizona. My store is in Texas how do I fix this. I have looked up in Who's online it shows 1 hour different. I have change from 0 to +1 no change. then change to -1 still no change what do I need to do fix this.

4 Dec 2009, 10:52 AM
#117
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

bkeaton:

I have install this contribution let say I live in Texas and my server is in Arizona. My store is in Texas how do I fix this. I have looked up in Who's online it shows 1 hour different. I have change from 0 to +1 no change. then change to -1 still no change what do I need to do fix this.

When you say "No Change"
Where are you looking to see the change?
As this mod is designed to change the dates that are stored in the database. You will have to make a sale to "see" the change that is recorded in the database.

I suspect you are looking in the admin header at the time displayed there.
That is the php time (not the mysql database time that this mod is used for)
To adjust the php time as displayed in the admin header you will have to edit the additional time_offset.php file to your time zone and place in the extra_configures directory.

Currently this file contains ```php

<?php //You can modify the TZ (Time Zone) by using one of the following offsets //TZ=America/Los_Angeles //TZ=America/Denver //TZ=America/Chicago //TZ=America/New_York putenv ('TZ=Australia/Melbourne'); ?>
Set the zone to your area
4 Mar 2010, 3:52 AM
#118
jeffwebb avatar

jeffwebb

New Zenner

Join Date:
Jul 2005
Location:
Tennessee, USA
Posts:
11
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

gilby:

Looks like you found the correct TZ for your area

Set the Time Zone Offset to +13
Check the time difference

Also looks like your mysql server is on a different server to your website server.
The warning will constantly pop up as it seems there is 6 minutes difference between them.
Remove the last (optional) part of the mod that gives this warning

I really like this mod WITH the optional files for the admin. However, intermittent alerts in the header over a one second difference between the servers drove me nuts!
Here's what I did.

Change lines 103 and 104 in YOUR_ADMIN/includes/header.php

From:

$tz_diff =  $tz_server_date_time - $tz_database_server_date_time;
  if ($tz_diff <> 0) {

To:

  $tz_diff =  abs($tz_server_date_time - $tz_database_server_date_time);
  if ($tz_diff > 1) {

Setting the $tz_diff variable with abs() ensures a positive or negative value will trigger the messages.

My time differences seemed to always be one second so I set my value to 1 but I suppose the tolerance for the difference could be set to any value (e.g. 6 minutes = 360 seconds).

I don't think this will affect any other part of the mod, but I could be wrong. Gilby would be the best one to verify that its okay.

Hope this is helpful!

30 Mar 2010, 1:41 AM
#119
deb4614 avatar

deb4614

New Zenner

Join Date:
Aug 2009
Posts:
5
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

Hi,

I just attempted to install this mod and have mucked it up completely.

This is the error message I am getting:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '8 HOUR), '1', 'alt_nav.php', '', '144.137.215.131')' at line 1
in:
[insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (date_add(now(), INTERVAL +h,8 HOUR), '1', 'alt_nav.php', '', '144.137.215.131')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I tried the back button and it will not let be access the admin area of the store at all. Even if I try to open it in a new window by typing the address in the address bar all I get is the error message.

How do I fix this?

30 Mar 2010, 2:43 AM
#120
deb4614 avatar

deb4614

New Zenner

Join Date:
Aug 2009
Posts:
5
Plugin Contributions:
0

Re: Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)

Fixed...

Not really sure how, a lot of trial and error but it is fixed. Sometimes I know just enough to get myself into trouble!