Post by leeburgess » Tue Aug 18, 2020 9:05 pm

How do I set the timezone on 3.0.3.6?

New member

Posts

Joined
Sat Sep 16, 2017 3:19 am

Post by EvolveWebHosting » Tue Aug 18, 2020 10:06 pm

leeburgess wrote:
Tue Aug 18, 2020 9:05 pm
How do I set the timezone on 3.0.3.6?
Try adding this to your php.ini file and change the zone accordingly:

date.timezone = "US/Central"

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by ventienda » Wed Aug 26, 2020 4:53 am

Hello!

I can't set my local time up in OpenCart.

I currently use OC 3.0.3.2, Journal Theme and PHP 7.3.21 (ea-php72).
In my case, OC has 7 hours in advance, that is, if an order is placed at 1 P.M. OC saves it as if it was placed at 8 P.M.
- My time zone is NY (US Eastern Time).

According to my PHP Info page the information shown is,
Timezone Database: internal
Default timezone: America/New_York

While in my php.ini file is the following:

Code: Select all

;Webmaster added date time zone 
date.timezone = America/New_York
display_errors = Off
;error_reporting = E_ALL
In addition, I created and uploaded a simple PHP file to verify the time:

Code: Select all

<?php
echo "The time is " . date("h:i:sa");
?>
And It's showing me the local time.

How can I set the date and time correctly?

User avatar
New member

Posts

Joined
Sun Aug 17, 2014 2:43 pm
Location - Venezuela

Post by johnp » Wed Aug 26, 2020 5:17 am

Try these. I don't know if they will work on 3.0.3.6 but they're worth a go:

https://www.opencart.com/index.php?rout ... h=timezone

https://www.opencart.com/index.php?rout ... load_id=60

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by sw!tch » Wed Aug 26, 2020 7:03 am

Keep in mind PHP timezone and mySQL timezone are different. If you screw around with PHP timezone then mySQL queries which revolve around NOW() can become problematic.

If you do this, you may want to ensure the database also has the same Timezone.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Who is online

Users browsing this forum: No registered users and 31 guests