AbanteCart Community
eCommerce construction => How-to questions => Topic started by: morangup on July 30, 2017, 07:40:53 PM
-
Help.. what am I missing here?
Date added is displayed in UTC... however the required is UTC+8 (Perth/Australia)
The store zone is correct, and php.ini has all the required
Admin console displays the Server time in the correct date and time!
<tbody><tr>
<th class="align_left">Date Added</th>
<th class="align_left">Status</th>
<th class="align_left">Customer's order comment</th>
</tr>
<tr>
<td class="valign_top">30/07/2017 01:30:21 PM</td>
-
Hello.
On what page you see issue?
-
index.php?rt=account/invoice&order_id=
index.php?rt=sale/order/details&order_id=
-
on order page you see time from mysql-database. Please check it via phpMyAdmin.
Probably mysql server time zone is wrong, not php.
-
is there no conversion to the coordinated zone in this component of abantecart?
-
good question.
not yet.
It's a server-side configuration.
You can try set timezone via Abantecart database driver.
Just open your core/database/amysqli.php file
and add this line
$connection->query("SET GLOBAL time_zone = 'Perth/Australia';");
after
$connection->query("SET SESSION SQL_BIG_SELECTS=1;");
-
Cheers... yep tried that.. sadly it hasn't transpired as yet. I'll keep trying a few different models until the solution is found!
Thanks for your help. :)
Best Regards Dave
-
What a shame that all this effort has gone into this project yet unfortunately Abantecart in it's current form is unsatisfactory for use in shared hosting environment where the global mysql database timezone is not to be changed. (for obvious reasons)
Hopefully this slight oversight will be corrected in the future.
-
This is not AbanteCart issue. This is a a pure server configurations related topic. You can configure your server to use time zone as you desire.
This is done on your hosting. Here is the example:
http://www.inmotionhosting.com/support/website/php/setting-the-timezone-for-php-in-the-phpini-file
Also you can set time zone on the database as well:
https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html
We can consider adding configuration setting in AbanteCart to help with this, but eCommerce application should not be controlling your server settings.
-
Abantecart are you saying this can be done on a Shared hosting environment without affecting other users. If so please specify exactly how to do this so I can relay the information to the network engineers?
-
System time and time zone are set on the hosted server side. You need to check your hosting or contact them directly. I posted links to articles with the help in prior post.
-
This is done on your hosting. Here is the example:
....inmotionhosting.com/support/website/php/setting-the-timezone-for-php-in-the-phpini-file
It looks like this might have worked to resolve this for me. I added this to my php.ini file found in the directory where AbanteCart resides:
date.timezone = "America/Boise"