I can not change the timezone of the database, as many other can not) and think that a sitewide timezone is needed.
Most of the php files use the reference NOW() for database queries, and the date/time of this can be different to the web server holding the site files. Most of us can use PHP's date_default_timezone_set to set the default timezone, but there is not one for the database server which is global for all accounts.
My suggestion is to have a 'custom_date_time' define in both of the config.php (catalog and admin) to globally set a date and time to use. Then have the NOW() in all files changed to custom_date_time so it uses this date/time and not that which is set by the database servers system date/time.
This will allow us to have a local date/time entered in the databases for our own timezone.
You can set the timezone when connecting to the database, or convert it while inserting / updating, but it would assume the timezone exists in mysql which is not always the case. I'll work on a solution later today.
Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com
There are extensions to do this in the extension store. I use a free one for v1.5, but do a search and you will find them.
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Who is online
Users browsing this forum: No registered users and 9 guests