Page 7 of 9 FirstFirst ... 56789 LastLast
Results 61 to 70 of 83
  1. #61
    Join Date
    Jan 2013
    Posts
    9
    Plugin Contributions
    0

    Default Re: Time Zone Fix Support Thread

    Quote Originally Posted by gilby View Post
    Not quite. See post 52
    You need to include the same file in 2 places (edited for your time zone)

    One for the ADMIN
    YOUR_RENAMED_ADMIN\extra_configures\time_zone_fix.php

    and one for the CATALOG (Store Front)
    includes\extra_configures\time_zone_fix.php
    I have officially been zenned.

    Thank you X 10000000....

    I had initially changed my timezone in php.ini, and that fixed my timezone issues only in my admin area but kept giving me wrong time stamps on orders.

    Next I added the recommended timezonefix file to includes/extraconfigurations and that fixed my order time stamp, but my order update times where still messing up and I really did not know what to do.

    After reading your comment just now, I uploaded the file also to myadmin/includes/extraconfigurations and voia! It works, my order update times are now correct.

    Thanks you guys for sharing the knowledge.

  2. #62
    Join Date
    Aug 2007
    Location
    Williston, Vermont
    Posts
    182
    Plugin Contributions
    1

    Default Re: Time Zone Fix Support Thread

    Zencart 1.5.1 - since the plugin only goes to 1.3.9, I started to manually make the changes. I see in the query factory on 1.5.1, the following:
    Code:
            if (getenv('TZ') && !defined('DISABLE_MYSQL_TZ_SET')) @mysql_query("SET time_zone = '" . substr_replace(date("O"),":",-2,0) . "'", $this->link);
    But, I don't see where the TZ environment variable is set.

    I already set the timezone for PHP 5.2 using the php.ini file.

    Is there a recommended way to set the TZ variable through zencart, or should I simply copy over the time_zone_fix.php files from your 1.3.9 plugin?

  3. #63
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Time Zone Fix Support Thread

    Quote Originally Posted by carlvt88 View Post
    Zencart 1.5.1 - since the plugin only goes to 1.3.9, I started to manually make the changes. I see in the query factory on 1.5.1, the following:
    Code:
            if (getenv('TZ') && !defined('DISABLE_MYSQL_TZ_SET')) @mysql_query("SET time_zone = '" . substr_replace(date("O"),":",-2,0) . "'", $this->link);
    But, I don't see where the TZ environment variable is set.

    I already set the timezone for PHP 5.2 using the php.ini file.

    Is there a recommended way to set the TZ variable through zencart, or should I simply copy over the time_zone_fix.php files from your 1.3.9 plugin?
    Starting with Zen Cart v1.5.0, this plugin's operation is part of the core-code. You just need to create a file named time_zone_offset.php and place this file (same file) in two locations:

    1. /includes/extra_configures/time_zone_offset.php
    2. /YOUR_ADMIN/includes/extra_configures/time_zone_offset.php



    The file will look similar to:
    Code:
    <?php
    // Full list of timezones here: http://php.net/manual/en/timezones.php
    //
    // You can modify the TZ (Time Zone) by using a named Country/City
    // eg:
    // TZ=America/Los_Angeles
    // TZ=America/Denver;
    // TZ=America/Chicago
    // TZ=America/Costa_Rica;
    putenv ('TZ=America/New_York');
    The link to the php.net site contains a list of all the valid TZ environment variable values.

  4. #64
    Join Date
    Jan 2006
    Location
    Downunder - QLD - Gold Coast
    Posts
    964
    Plugin Contributions
    0

    Default Re: Time Zone Fix Support Thread

    Hi can the file 'includes\classes\db\mysql\query_factory.php' be used in version 1.5.1 as it over writes the existing version file?
    Downunder QLD

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

    Default Re: Time Zone Fix Support Thread

    Quote Originally Posted by oavs View Post
    Hi can the file 'includes\classes\db\mysql\query_factory.php' be used in version 1.5.1 as it over writes the existing version file?
    NO, This part of the code is already in the 1.5 series and is NOT needed. DON'T over write this file.

    2 files from this mod are needed. See Post# 63

  6. #66
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Time Zone Fix Support Thread

    Scenario: ZC shop located in Pacific TZ.

    ZC 1.37 shop hosted on a server in Central TZ, running PHP 5.4.15 with the ZC 'Time Zone Offset' mod installed, and -2 offset set under Admin > Config > My Store. Everything seemed good.

    Sometime after payment module callbacks and the admin header began showing a two hour difference. Just let it go as it was not a bid deal. Shop order status updates and customer emails went out with proper time stamps.

    Then installed fresh clean zc 1.51 on the same server for testing and noted everything in admin showed up as 0 GMT (eight hours ahead). Setting Admin > Config >MyStore to a -8 offset appeared to did nothing.

    Then account was moved to a new server, still in the Central TZ, but with PHP 5.4.20. But same issue observed.

    So followed Time Zone Fix readme instructions (and instructions in this thread) for ZC 1.51, editing the two time_zone_offset.php files (for the Pacific TZ), and uploading to the catalog and admin side.

    Code:
    putenv ('TZ=America/Los_Angeles');
    But everything in admin still shows up as 0 GMT.

    I don't have access to php.ini, but I requested the host to edit for Pacific TZ environment variable. Everything in admin still shows up 0 GMT. However began to observe errors similar to the following in server error log:

    Code:
    PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
    Just requested the webhost to double check the php.ini change to see if spelling is correct. But from the error message above, it appears the ecommerce app should be managing the time zone, not letting the "system" do so.

    Not sure why unable to configure ZC 1.51 for the proper TZ, where I was able to do so in ZC 1.37 (for awhile anyway).

    Does the issue possibly have anything to do with the PHP version?.

    P.S. What exactly dos the Time Off set entry in Admin > Config > My Store suppose to do? Is that part of core, or is that a leftover mod remnant still in the database?

  7. #67
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Time Zone Fix Support Thread

    Well, I was wrong. Web host said he didn't alter the php.ini for the current running version og php (5.4.20 native). Stated he set up PHP 5.5 with a customized time zone, and wanted me to test using the PHP switcher in ControlPanel. But I repeated that ZC 1.51 is not supported on PHP 5.5

    http://www.zen-cart.com/content.php?...o-run-zen-cart

    So with ZC 1.52 slated to support PHP 5.5, i think I will just wait to work on solving all these PHP flags showing up in my debug, and various error logs. Hope to see 1.52 sooner than later.

  8. #68
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Time Zone Fix Support Thread

    Solved... i missed seeing the ZC date.timezone patch patch released in June.

    http://www.zen-cart.com/showthread.p...HP-5-3-5-4-5-5

    No need then for the Time Zone Fix (time_zone_offset.php)

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

    Default Re: Time Zone Fix Support Thread

    Quote Originally Posted by Woodymon View Post
    Solved... i missed seeing the ZC date.timezone patch patch released in June.

    http://www.zen-cart.com/showthread.p...HP-5-3-5-4-5-5

    No need then for the Time Zone Fix (time_zone_offset.php)
    Not Necessarily....
    This will "fix" the php time zone.
    You may still need the TZ variables to "fix" the mysql date and time stamps

  10. #70
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Time Zone Fix Support Thread

    Quote Originally Posted by gilby View Post
    Not Necessarily....
    This will "fix" the php time zone.
    You may still need the TZ variables to "fix" the mysql date and time stamps
    Thanks, meant to put a ? mark at end of my last sentence. So in my admin orders page Paypal is showing the correct Pacific time in it's time stamps, but the Zen Cart comment entries shows two hours ahead (Central time) for its time stamps. And so I uploaded the time-zone_fix.php in the two respective directories

    putenv ('TZ=America/Los_Angeles');

    but still see the timestamps in admin -> orders off by two hours.

    Two questions:

    1. What does the Time Zone Offset entry in Admin >Config > MyStore suppose to do? Is that a stock zc 1.51 configuration entry? Or something leftover in the database from a previous time zone offset mod install (upgraded the zc db from 1.37 to 1.51)?

    I entered "-2" in the form but appears to not be doing anything. Within phpmyadmin I don't see any function associated with that entry in the configuration table.

    2. query_factory.php Line 71 shows the following code. What is the function of "-2" in that line? Is that a hardcoded offset? Pretty certain this is the stock zc1.51 file.

    Code:
    if (getenv('TZ') && !defined('DISABLE_MYSQL_TZ_SET')) @mysql_query("SET time_zone = '" . substr_replace(date("O"),":",-2,0) . "'", $this->link);

 

 
Page 7 of 9 FirstFirst ... 56789 LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  2. Multiple Zone Rates Support Thread
    By totalsam in forum Addon Shipping Modules
    Replies: 54
    Last Post: 24 Feb 2015, 03:34 PM
  3. v150 Time Zone Fix
    By donscotti in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 4 Nov 2012, 07:09 PM
  4. 1064 Error after installing Time Zone Fix addon
    By HFProjekte in forum General Questions
    Replies: 3
    Last Post: 6 Aug 2011, 11:01 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR