Author Topic: Incorrect time- displayed in UTC  (Read 2484 times)

Offline morangup

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Incorrect time- displayed in UTC
« 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>


Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4406
  • Karma: +205/-0
    • View Profile
Re: Incorrect time- displayed in UTC
« Reply #1 on: July 31, 2017, 03:08:32 AM »
Hello.

On what page you see issue?
“Chuck Norris is so amazing.”
― Mother Teresa

Offline morangup

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Incorrect time- displayed in UTC
« Reply #2 on: July 31, 2017, 03:13:14 AM »
index.php?rt=account/invoice&order_id=


index.php?rt=sale/order/details&order_id=
« Last Edit: July 31, 2017, 03:22:11 AM by morangup »

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1783
  • Karma: +248/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Incorrect time- displayed in UTC
« Reply #3 on: July 31, 2017, 03:26:41 AM »
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

Offline morangup

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Incorrect time- displayed in UTC
« Reply #4 on: July 31, 2017, 03:40:26 AM »
is there no conversion to the coordinated zone in this component of abantecart?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1783
  • Karma: +248/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Incorrect time- displayed in UTC
« Reply #5 on: July 31, 2017, 04:10:45 AM »
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
Code: [Select]
$connection->query("SET GLOBAL time_zone = 'Perth/Australia';");after
Code: [Select]
$connection->query("SET SESSION SQL_BIG_SELECTS=1;");
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline morangup

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Incorrect time- displayed in UTC
« Reply #6 on: July 31, 2017, 04:16:42 AM »
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

Offline morangup

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Incorrect time- displayed in UTC
« Reply #7 on: July 31, 2017, 05:06:06 AM »
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.





Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4153
  • Karma: +251/-9
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Incorrect time- displayed in UTC
« Reply #8 on: July 31, 2017, 09:26:21 AM »
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.
We need your help to build better free open source eCommerce platform for everyone.
See how you can help

Offline morangup

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Incorrect time- displayed in UTC
« Reply #9 on: July 31, 2017, 10:09:45 AM »
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?

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4153
  • Karma: +251/-9
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Incorrect time- displayed in UTC
« Reply #10 on: August 02, 2017, 02:31:16 PM »
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.
We need your help to build better free open source eCommerce platform for everyone.
See how you can help

Offline scottwww

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: Incorrect time- displayed in UTC
« Reply #11 on: August 25, 2017, 11:17:10 PM »
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"

 

Powered by SMFPacks Social Login Mod