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,519

Results 41 to 60 of 140
2 Aug 2007, 8:42 PM
#41
stennochau avatar

stennochau

New Zenner

Join Date:
Jul 2007
Posts:
6
Plugin Contributions:
0

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

Can anyone help me with this??

I have installed the Time Zone Offset.

In the readme file it says:

"================================================= =======
OPTIONAL FILES
admin/includes/extra_configures/time_offset.php
This file needs to be EDITED to point to your local timezone, but it may not work on all servers.
It updates the admin display to show your local time.
If it does work then you may want to use
admin/includes/header.php
This file compares the admin header time produced by the above time_offset.php file with the Time Zone Offset time and displays a warning if there is a difference. This is helpful when either local or the hosting server time zone move into or out of daylight saving time. It produces a visible warning of such changes.
================================================== ======"

I installed the admin/includes/extra_configures/time_offset.php and admin/includes/header.phpfile and the time is set to Australia Melbourne.

However, when I click on configuration/My Store, These words shows on the header:

Warning TIME ZONE OFFSET ERROR! Time Zone Offset is set to +8 Hours. The difference between Server & Database time is 9 Hours.
Warning 2007-08-03 06:41:03: TZ Server Time
Warning 2007-08-02 21:41:03: Offset Database Server Time:

I am in China....how to I correct this??

Hope someone can help!

Thanks,
Stenno Chau

3 Aug 2007, 4:07 AM
#42
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)

stennochau:

Can anyone help me with this??

I have installed the Time Zone Offset.

I installed the admin/includes/extra_configures/time_offset.php and admin/includes/header.phpfile and the time is set to Australia Melbourne.

However, when I click on configuration/My Store, These words shows on the header:

Warning TIME ZONE OFFSET ERROR! Time Zone Offset is set to +8 Hours. The difference between Server & Database time is 9 Hours.
Warning 2007-08-03 06:41:03: TZ Server Time
Warning 2007-08-02 21:41:03: Offset Database Server Time:

I am in China....how to I correct this??

Hope someone can help!

Thanks,
Stenno Chau

Hi Stenno
Is your time zone the same as Australia/Melbourne?
If not you need to edit it to use the apprpriate time zone for you.
If it is correct then you need to set the configuration variable to -1 (instead of +8 at the moment)

4 Aug 2007, 2:51 AM
#43
stennochau avatar

stennochau

New Zenner

Join Date:
Jul 2007
Posts:
6
Plugin Contributions:
0

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

Hi gilby,

I have set the time zone to Australia/Perth. Now my time is correct.
But I still have those three warnings on my admin header.

Warning TIME ZONE OFFSET ERROR! Time Zone Offset is set to 0 Hours. The difference between Server & Database time is 15 Hours.
Warning 2007-08-04 10:46:19: TZ Server Time
Warning 2007-08-03 19:46:19: Offset Database Server Time:

Now how do I make these warnings disappear??

4 Aug 2007, 12:10 PM
#44
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)

stennochau:

Hi gilby,

I have set the time zone to Australia/Perth. Now my time is correct.
But I still have those three warnings on my admin header.

Warning TIME ZONE OFFSET ERROR! Time Zone Offset is set to 0 Hours. The difference between Server & Database time is 15 Hours.
Warning 2007-08-04 10:46:19: TZ Server Time
Warning 2007-08-03 19:46:19: Offset Database Server Time:

Now how do I make these warnings disappear??

In Admin
Configuration -> My Store -> Time zone Offset
Change this value to +15

14 Sep 2007, 4:19 PM
#45
ellisn avatar

ellisn

New Zenner

Join Date:
Aug 2007
Posts:
34
Plugin Contributions:
0

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

Thought this may be of use to someone

tz zones

16 Dec 2007, 4:53 PM
#46
bandora avatar

bandora

New Zenner

Join Date:
Oct 2007
Location:
Miami, FL
Posts:
29
Plugin Contributions:
0

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

Has anyone tested this contribution or updated it to work with 1.3.8a?

I tried installing it on my test environment, however I also have Edit Orders and How Did you Hear about Us installed both modifying orders.php so I tried to carefully merge the files but I don't understand code and I seem to have broken something because I got a parse error when viewing orders so I have uninstalled the contribution for now.

17 Dec 2007, 12:49 PM
#47
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)

bandora:

Has anyone tested this contribution or updated it to work with 1.3.8a?

I tried installing it on my test environment, however I also have Edit Orders and How Did you Hear about Us installed both modifying orders.php so I tried to carefully merge the files but I don't understand code and I seem to have broken something because I got a parse error when viewing orders so I have uninstalled the contribution for now.

I hope to update it early january after I install 1.38a
Christmas is just too busy to try it out now

19 Dec 2007, 3:27 AM
#48
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

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

I get this while entering the admin online.

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 ' 2 HOUR) as date' at line 1
in:
[select date_add(now(), INTERVAL -h, 2 HOUR) as date]
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 just did a DB restore and also a site restore. Now what?

Cheers!
v2.2.1

28 Dec 2007, 9:47 AM
#49
ojm avatar

ojm

New Zenner

Join Date:
Oct 2007
Posts:
68
Plugin Contributions:
0

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

Just installed this contribution, and looks to be working great, however noticed a small bug, and something strange on my setup;

If you don't put a value in the 'time offset' field (within the Admin side), it breaks the admin pages. I had to go into the database and put a '0' as the value to bring everything back online. Might be best to have some code which inputs a '0' into the db if nothing is entered.

I set the TZ as Europe/London, which has set my admin time to GMT. However, with '0' as my time offset, it states 'The difference between Server & Database time is -6.94916666667 Hours'. Makes me wonder what time my host has set on their servers! If I then set my time offset to -6.94916666667, it states 'The difference between Server & Database time is 0.0508333333333 Hours'.

Help! My time difference is 3 mins and 3 seconds off! I don't think I can get it 100% accurate, but if anyone has any suggestions...?

Thanks in advance!

28 Dec 2007, 12:58 PM
#50
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)

OJM:

Just installed this contribution, and looks to be working great, however noticed a small bug, and something strange on my setup;

If you don't put a value in the 'time offset' field (within the Admin side), it breaks the admin pages. I had to go into the database and put a '0' as the value to bring everything back online. Might be best to have some code which inputs a '0' into the db if nothing is entered.
There is no input error checking so a number of non standard values can crash it.

OJM:

I set the TZ as Europe/London, which has set my admin time to GMT. However, with '0' as my time offset, it states 'The difference between Server & Database time is -6.94916666667 Hours'. Makes me wonder what time my host has set on their servers! If I then set my time offset to -6.94916666667, it states 'The difference between Server & Database time is 0.0508333333333 Hours'.
You should only use whole numbers with this version ie -7

OJM:

Help! My time difference is 3 mins and 3 seconds off! I don't think I can get it 100% accurate, but if anyone has any suggestions...?
Thanks in advance!
At a guess your php & mysql are on different servers and have different times set.
To fix the error appearing don't install (or uninstall) the code in the "optional "directory

28 Dec 2007, 4:04 PM
#51
ojm avatar

ojm

New Zenner

Join Date:
Oct 2007
Posts:
68
Plugin Contributions:
0

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

Cheers gilby!

I've set it to -7, and removed the optional 'header.php' file. I've kept the 'time_offset.php' as that keeps the admin time as GMT.

Thanks for the great contribution!

12 Jan 2008, 11:05 AM
#52
tjr_stores avatar

tjr_stores

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
66
Plugin Contributions:
0

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

gilby:

I hope to update it early january after I install 1.38a
Christmas is just too busy to try it out now

Any updates on this for 1.38 ?

Thanks

18 Feb 2008, 10:39 PM
#53
jarotbudhi avatar

jarotbudhi

New Zenner

Join Date:
Feb 2008
Posts:
3
Plugin Contributions:
0

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

Is it ok to install this mod for different languange?

23 Feb 2008, 4:51 AM
#54
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

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

Hello,

Do you know how to uninstall the time zone mod?

I installed it and im getting this error in the admin:

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 '13 HOUR), '1', 'configuration.php', 'gID=5&', '121.79.14.170')' at line 1
in:
[insert into zen_admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (date_add(now(), INTERVAL +h 13 HOUR), '1', 'configuration.php', 'gID=5&', '121.79.14.170')]
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 think I am getting this beacuse within Admin --> config --> My Store --> Time zone , I think I entered something wrong, however it wont let me get back in there to change it. I can's actualy access my admin area at all now, as the error message above keeps coming up.

I read the FAQ here:

**https://www.zen-cart.com/tutorials/index.php?article=27**

however the line in question was already set correctly:

@setlocale(LC_TIME, 'en_US.ISO_8859-1');

I thought I might uninstall it and start again.

Or if anyone has any other ideas that would be good also.

Kind regards,
Anthony

24 Feb 2008, 7:06 AM
#55
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)

xman888:

Hello,

I think I am getting this beacuse within Admin --> config --> My Store --> Time zone , I think I entered something wrong, however it wont let me get back in there to change it. I can's actualy access my admin area at all now, as the error message above keeps coming up.

I thought I might uninstall it and start again.

Or if anyone has any other ideas that would be good also.

Kind regards,
Anthony

If you put anything except a whole number 6 or -15 for example it will crash as there is no error checking for valid inputs.
Use phpmyadmin to directly alter the invalid value in the database.

If you want to uninstall it you will have to extract the original php files and overright the ones that you installed from this mod

24 Feb 2008, 7:08 AM
#56
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

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

Hello,

Thanks for the reply.

I was able to fix it by editing the configuration table, and then importing it.

Kind regards,
Anthony

26 Feb 2008, 5:11 PM
#57
langflyer avatar

langflyer

New Zenner

Join Date:
Nov 2007
Posts:
47
Plugin Contributions:
0

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

I hv installed the v1.3.8, it works fine, but when I check on order, I got this error :

Fatal error: Call to undefined function zen_get_orders_comments() in /home/angguguc/public_html/momsworld/shop/admin/orders.php on line 804

Please help. Thanks in advance.

26 Feb 2008, 9:17 PM
#58
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)

langflyer:

I hv installed the v1.3.8, it works fine, but when I check on order, I got this error :

Fatal error: Call to undefined function zen_get_orders_comments() in /home/angguguc/public_html/momsworld/shop/admin/orders.php on line 804

Please help. Thanks in advance.

Using the developers toolkit we see that zen_get_orders_comments() is defined in /admin/includes/functions/general.php which is not part of the time zone offset mod.
My guess is that you missed this file in the upgrade to 138a
Check that /admin/includes/functions/general.php is the correct version and has the missing function.

27 Feb 2008, 9:16 AM
#59
langflyer avatar

langflyer

New Zenner

Join Date:
Nov 2007
Posts:
47
Plugin Contributions:
0

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

gilby:

Using the developers toolkit we see that zen_get_orders_comments() is defined in /admin/includes/functions/general.php which is not part of the time zone offset mod.
My guess is that you missed this file in the upgrade to 138a
Check that /admin/includes/functions/general.php is the correct version and has the missing function.

:oops: my zencart version is actually 137 :P

I hv reinstalled the version for 137, now..... my problem solved. Thank you so much. :thumbsup:

29 Mar 2008, 3:04 AM
#60
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

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

Well, I installed it, but no matter what value I put in Admin>My Store>Time Zone Offset, the time at the top of the ACP does not change. I tried the optional thing and it was telling me the difference between me and the server was 8 hours, which was wrong, so I took it back out. Somehow, that got me closer than I was at first, actually even changed the time shown in the Server/Version Info screen for the server date/time, but still, when I try to use the offset, it doesn't change anything.

I'm running 1.3.8a and the latest version of the mod.

Thanks!