News:

AbanteCart v1.4.2 is released.

Main Menu

Incorrect time- displayed in UTC

Started by morangup, July 30, 2017, 07:40:53 PM

Previous topic - Next topic

morangup

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>


Basara


morangup

#2
index.php?rt=account/invoice&order_id=


index.php?rt=sale/order/details&order_id=

abolabo

on order page you see time from mysql-database. Please check it via phpMyAdmin.
Probably mysql server time zone  is wrong, not php.
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

morangup

is there no conversion to the coordinated zone in this component of abantecart?

abolabo

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;");
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

morangup

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

morangup

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.





abantecart

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.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

morangup

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?

abantecart

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.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

scottwww

Quote from: abantecart on July 31, 2017, 09:26:21 AM
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"

Forum Rules Code of conduct
AbanteCart.com 2010 -