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
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 ...
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
Anyone who can help ?
Is there no one who can help me ?
Maybe this is what you need?
http://www.oscommerce.com/community/...earch,timezone
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:
Is this information still relevant and how would I adapt to osCMax?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
Step 2.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));
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
Until 1 month ago I only knew basic html so please take this into consideration!
Just make the changes as recommended. Should work with no issues.
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:
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.//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));
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.
Bookmarks