osCmax v2.5 User Manual
Results 1 to 7 of 7

Time Zone

This is a discussion on Time Zone within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; Hi Does any version have time zone offset in the admin. My servers are located in different time zones. All ...

      
  1. #1
    New Member
    Join Date
    Mar 2005
    Posts
    25
    Rep Power
    0


    Default Time Zone

    Hi
    Does any version have time zone offset in the admin. My servers are located in different time zones.
    All help / guidance / information will be appreciated.

    Tany

  2. #2
    New Member
    Join Date
    Mar 2005
    Posts
    25
    Rep Power
    0


    Default RE: Time Zone

    Anyone who can help ?

  3. #3
    New Member
    Join Date
    Mar 2005
    Posts
    25
    Rep Power
    0


    Default

    Is there no one who can help me ?

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Does this look promising?


  5. #5
    Lurker Molly's Avatar
    Join Date
    Aug 2006
    Location
    USA
    Posts
    4
    Rep Power
    0


    Question help with this

    I note the Time Zone mod isn't fully functional with orders, etc.

    I am in the US-central and my host is UK. I need to minus 8 hours for orders, display dates, etc., to show correctly.

    I have found this discussion from 2003:

    The following enables you to set a local time different to your hosts server. Particularly useful if your site is hosted in a different timezone to you and your customers. Adds the necessary number of hours to GMT.

    Step 1.
    Add the following to ../catalog/includes/application_top.php & ../admin/includes/application_top.php

    define ('TIME', strtotime(gmstrftime("%Y-%m-%d %H:%M:%S", strtotime ("+ 11 hour"))));
    define ('NOW', gmdate ('Y-m-d H:i:s', time() + 11 *3600));
    Step 2.
    Replace the "11" with the number of hours your timezone is ahead of GMT (ie., Australian daylight savings time is 11 hours ahead of GMT)

    Step 3.
    In files where the date or time is displayed onscreen or written to the database, replace time() with TIME and now() with NOW ( ie., checkout_process.php, whos_online.php, login.php, orders.php etc.)
    * For SQL queries replace now() with '" . NOW . "'

    or:

    Rather than mess with counting timezones, just let the system solve that for you.

    putenv("TZ=US/Pacific");

    Now all the times returned by the system will be in US/Pacific.

    putenv() is really to display local order time in confirmation emails.
    I found something at http://www.php.net/manual/en/function.putenv.php - bottom of the page.
    'You would have to add a putenv() call to each page in which you wanted to change the timezone.'

    I put my putenv() for the timezone into application_top.php
    Is this information still relevant and how would I adapt to osCMax?

    Until 1 month ago I only knew basic html so please take this into consideration!

  6. #6
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    Just make the changes as recommended. Should work with no issues.

  7. #7
    Lurker Molly's Avatar
    Join Date
    Aug 2006
    Location
    USA
    Posts
    4
    Rep Power
    0


    Default

    Thanks, Mike.

    Please bear with me here. I do not know anything about PHP. This is what I added to /catalog/includes/application_top.php:

    //define ('TIME', strtotime(gmstrftime("%m%d-%Y %H:%M:%S", strtotime ("- 8 hour"))));
    define ('NOW', gmdate ('m-d-Y H:i:s', time() - 8 *3600));
    Is this correct? So far I note no change in my display, but think I might need to change both application files to see a difference.

    And, if so, where can I find admin/includes/application_top.php ??

    I may put this on the back burner until I become more familiar with PHP and Max.

Similar Threads

  1. zone Error
    By namita in forum osCommerce 2.2 Installation Help
    Replies: 5
    Last Post: 02-10-2005, 04:03 PM
  2. Zone Shipping
    By kmazumdar in forum osCommerce 2.2 Modification Help
    Replies: 13
    Last Post: 01-20-2005, 03:41 AM
  3. Tax Zone Problem
    By obinet in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 07-21-2004, 12:10 PM
  4. Zone Error
    By lehanej in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 02-17-2004, 03:49 AM
  5. Time Zone
    By rd42 in forum osCMax v1.7 Installation
    Replies: 1
    Last Post: 01-08-2004, 06:33 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
  •