Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36
  1. #1
    Join Date
    Nov 2005
    Location
    Ipswich, UK
    Posts
    21
    Plugin Contributions
    0

    Default Time Zone Offset Problem

    Hello,

    Ive just installed the Time Zone Offset contribution but im in a bit of a circle trying to get it to work on the admin side. I keep getting an error with the 1.3.0.2 version saying:

    "Time Zone Offset is set to +5 Hours. The difference between Server & Database time is -8 Hours."

    So, duly, I change the offset to -8 hours and the message swaps round:

    "Time Zone Offset is set to -8 Hours. The difference between Server & Database time is 5 Hours."

    My server is located in California and I am based in the UK. Im sure its something simple im missing but I cant quite figure out what it is. Any help would be grately appreciated!
    Adam Boyle

  2. #2
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Time Zone Offset Problem

    To get this message you must have installed the 2 optional files.

    One of these files you have to select your time zone by editing a TZ setting
    admin/includes/extra_configures/time_offset.php
    You can check if this is working correcting by checking the time & date displayed in admin. Apparantly this does not work on all servers. If it doesn't then there is no point installing the 2nd optional header file which is giving the warning message.

    If this is correct you can install the optional header file which displays the difference between the new server time as displayed in admin and the time zone offset set for the mysql database.
    admin/includes/header.php

    +5 sounds about right for you so I would suspect you haven't edited
    admin/includes/extra_configures/time_offset.php
    to point to your time zone (the default setting is my zone in australia +14 hours)

    Try editing this file to get the admin heading to display your time zone first, let us know it this works.

  3. #3
    Join Date
    Nov 2005
    Location
    Ipswich, UK
    Posts
    21
    Plugin Contributions
    0

    Default Re: Time Zone Offset Problem

    Thanks for your reply, I think the problem must be with the server because no matter what i change the time zone offset value to the admin time/date remains the same.

    Thanks very much for your help, just need to remove the optional header file!!

  4. #4
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Time Zone Offset Problem

    Quote Originally Posted by AdamBoyle
    Thanks for your reply, I think the problem must be with the server because no matter what i change the time zone offset value to the admin time/date remains the same.

    Thanks very much for your help, just need to remove the optional header file!!
    The time zone offset value in admin does not affect the admin time display.

    You need to edit
    admin/includes/extra_configures/time_offset.php
    which contains..
    PHP Code:
    <?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'); 
    ?>
    you need to change

    putenv ('TZ=Australia/Melbourne');

    to what ever your time zone is, you may have to google to find the valid text for your time zone

  5. #5
    Join Date
    Dec 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Time Zone Offset Problem

    hi, thanks for the help previously.

    so if i am from Singapore, what should i put ?

    i tried to google but it always dun work.
    Singapore, Singapore for GMT +8 ?

  6. #6
    Join Date
    Dec 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Time Zone Offset Problem

    EDITED

    http://sg.php.net/manual/en/timezones.php

    i found it myself, for the benefit of others, it uses PHP date function, so yup,

  7. #7
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Time Zone Offset Problem

    This mod was working perfectly for me until an hour ago. I've not changed anything, but suddenly the following message has appeard in the header of my admin area:

    Warning: putenv() [function.putenv]: Safe Mode warning: Cannot set environment variable 'TZ' - it's not in the allowed list in /home3/limelite/public_html/****ADMIN****/includes/extra_configures/time_offset.php on line 8
    Warning TIME ZONE OFFSET ERROR! Time Zone Offset is set to +5 Hours. The difference between Server & Database time is -5 Hours.
    Warning 2009-10-05 04:57:10: TZ Server Time
    Warning 2009-10-05 09:57:10: Offset Database Server Time:

    I remember I had similar messages at the install stage, but I added the optional files and edited the time_offset.php to this:

    PHP Code:
    <?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=Europe/London'); 
    ?>
    Which did work, until now.

    Anyone have any idea what's gone wrong?

    I've tried changing the +5 in the admin My Store area to different cariables, +6 +4 etc., etc., but the same error every time.

    Anyone?
    Last edited by limelites; 5 Oct 2009 at 10:05 AM.

  8. #8

    Default Re: Time Zone Offset Problem

    Hi,

    I was having the same problem too

    "Time Zone Offset is set to +13 Hours. The difference between Server & Database time is 2 Hours."

    When I change the offset to +2 hours and the message swaps round:

    "Time Zone Offset is set to +2 Hours. The difference between Server & Database time is 13 Hours."

    Then I added the different together and changed it to +15, fixed the problem.

  9. #9
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Time Zone Offset Problem

    Quote Originally Posted by Defanci View Post
    Hi,

    I was having the same problem too

    "Time Zone Offset is set to +13 Hours. The difference between Server & Database time is 2 Hours."

    When I change the offset to +2 hours and the message swaps round:

    "Time Zone Offset is set to +2 Hours. The difference between Server & Database time is 13 Hours."

    Then I added the different together and changed it to +15, fixed the problem.
    Its a bit cryptic...
    When its set to +13 hours. It telling you that it is NOW +2 hours out

    So...... Try +15 hours (+13 +2)

  10. #10
    Join Date
    Jan 2009
    Posts
    126
    Plugin Contributions
    0

    Default Re: Time Zone Offset Problem

    Hey,

    So how would you integrate this with ZC. I know the Time Zone Offset mod used MySQL functions to change the date, but there is apparently a better way to do it with php now pho has improved. Anyone got any ideas how to do this?

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Time Zone Offset problem
    By trappersam in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 Oct 2007, 12:08 PM
  2. Time Zone Offset
    By harry2cool in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 26 Jul 2006, 09:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg