Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33
  1. #1
    Join Date
    Sep 2005
    Location
    Hong Kong
    Posts
    307
    Plugin Contributions
    0

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

    Hi all!

    My server used to be on New York time while I'm located in Hong Kong, so I asked my web host to change the server to Hong Kong time for me. After that, both the current time displayed on the green bar near the top inside ZC admin and the timezone displayed on the "Server Info" page are correct, meaning they are both Hong Kong time.

    But when I placed a test order, the admin showed that the order was placed in New York time, which means it was 12 hours behind Hong Kong.

    BUT the timestamp in the order confirmation email that I received was correct, meaning it was indeed showing Hong Kong time.

    What gives? I'm not very familiar with server / PHP stuff so any help is greatly appreciated, thank you in advance!

    On my "Server Info" page:

    date

    date/time support enabled
    "Olson" Timezone Database Version 2012.8
    Timezone Database internal
    Default timezone Asia/Hong_Kong

    Directive Local Value Master Value
    date.default_latitude 31.7667 31.7667
    date.default_longitude 35.2333 35.2333
    date.sunrise_zenith 90.583333 90.583333
    date.sunset_zenith 90.583333 90.583333
    date.timezone Asia/Hong_Kong Asia/Hong_Kong

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    You could use the files for this that are used in v1.5.2 adding:
    /includes/extra_configures/set_time_zone.php

    and setting your time zone for the code in RED:
    Code:
    <?php
    /**
     * @package initSystem
     * @copyright Copyright 2003-2013 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version GIT: $Id: Author: DrByte  Sat Nov 2 01:21:28 2013 -0400 New in v1.5.2 $
     */
    /*
     * Set time zone
    */
    if (version_compare(PHP_VERSION, 5.3, '>='))
    {
      // put your timezone here. Refer to http://www.php.net/manual/en/timezones.php
      $TZ = '';  // eg: 'Europe/Oslo'
    
    
    
      /**
       * MAKE NO CHANGES BELOW THIS LINE
       *
       * The following will take the timezone you specified above and apply it in your store.
       * If you didn't specify one, it will try to use the setting from your server's PHP configuration
       */
      if ($TZ == '') {
        $TZ = date_default_timezone_get();
      }
      if ($TZ != '') {
        putenv('TZ=' . $TZ);
        @date_default_timezone_set($TZ);
      }
    }
    And add to your secret admin the file:
    /your_secret_admin/includes/extra_configures/use_catalog_time_zone.php

    with the code:
    Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2003-2013 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version GIT: $Id: Author: DrByte  Sat Nov 2 01:21:28 2013 -0400 New in v1.5.2 $
     */
    // get time zone settings from catalog-side file
    include (DIR_FS_CATALOG . '/includes/extra_configures/set_time_zone.php');
    That should fix things for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jul 2005
    Posts
    44
    Plugin Contributions
    0

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

    It works!!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    Thanks for the update that this is now working for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jul 2005
    Posts
    44
    Plugin Contributions
    0

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

    Hi Linda, got another small issue. Now the order time is correct but order status update still shows american time.

    For exmaple, the order status "pending" time is as same as local time, but when we update the status to " delivered", the time is not local time , it still display american time. How can we change it as well? Thanks for your helps!

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    Which Zen Cart version are you running again?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Jul 2005
    Posts
    44
    Plugin Contributions
    0

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

    it is v1.5.1

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    You did everything in post #2 correct?

    What version php are you using?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Jul 2005
    Posts
    44
    Plugin Contributions
    0

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

    Yes, I set up those two files. It is PHP Version: 5.3.26 (Zend: 2.3.0)

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    This is really odd ... so far, in v1.5.1, using those two files, I am unable to reproduce this issue ...

    I will keep looking and see if I can make it happen on one of my other servers ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. v150 Order list doesn't show the correct payment status
    By kalastaja in forum Managing Customers and Orders
    Replies: 3
    Last Post: 29 Sep 2013, 04:03 AM
  2. v150 GV can be activated, even though the payment of the order was not successful
    By kalastaja in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 2 Mar 2013, 03:46 PM
  3. Replies: 3
    Last Post: 20 Mar 2012, 06:20 PM
  4. Why doesn't my site show up, even though I've already installed a template?
    By ktscootrpie in forum Installing on a Windows Server
    Replies: 1
    Last Post: 18 May 2011, 11:46 PM
  5. Logout link missing even though code seems correct
    By monkeytastic in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Apr 2010, 03:20 PM

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