http://www.opencart.com/index.php?route ... on_id=9407
Increase Page Speed (#1 rated commercial extension on OpenCart Marketplace)
15in1 Essential Extensions Value Pack Premium Customer Testimonials Reward Points Extended Admin Security Lockdown Suite
VQMOD can't change this file. I don't know why No errors.
I was happy and says that it work, but forgot to redo changes in mysql.php
May there is some professional which can describe, why it's not worked?
Anyway, the attached file has this change in it - try it out and see how it goes for you. Note that the original .xml included code to set the PHP time zone - I have removed it because it was set to an explicitly named zone (will save those people who are too lazy or don't understand the xml files). You should set the timezone in your php.ini or .htaccess file. Or put it back into the XML.
Special offer if you want to take advantage of holiday pricing. Free install and free support for anyone that asks.
Install Extensions OR OpenCart Fast Service! PayPal Accepted
I will professionally install and configure any free or purchased theme, module or extension.
Visit http://www.mrtech.ca if you need an OpenCart webmaster
I've got vqmod installed too but didn't find such option to change..
So all in all, I only modified the system/startup.php & mysql.
Still works great! (^_^)
I'm using Opencart 22.214.171.124 & vQmod 2.3.2.
in config.php ?
i usually use a common config.php inherited by admin and catalog config.
To set MySQL connection time_zone there is a P format for date function:
date('P') return +1:00, -03:00 etc etc
date.timezone = Europe/Berlin;
In both options, the time returned is still 8:00 +2:00 CEST, so the hour stays the same, although the zone is updated.
I tried <?php echo date("D M j G:i:s T Y"); ?> in my header, and it shows the correct time.
I tried in mysql admin:
SET time_zone = '+2:00'; SELECT NOW(); //and the time actually shows correct at 14:00
SELECT NOW(); // shows the server time at 8:00
SELECT @@global.time_zone, @@session.time_zone; //shows both values as SYSTEM
I assume that everytime I add a date into the database with the NOW() function, I'm getting the server time. But I wonder how date.timezone = Europe/Berlin; changes the echo in my header.
date.timezone = Europe/Berlin;
To php.ini in the root. This changed the zone for catalog, but admin still showed as UTC. Perhaps it should be added to the php.ini also in the admin folder, but I went ahead and just changed it in the startup.php.
Now the database is actually storing the time based on the local time of Europe/Berlin.
But it was strange that previously the time being stored was -6:00 from UTC, while the code only compares local time to UTC, which is a difference of +2:00.
But also when I enter SET time_zone = '+2:00'; SELECT NOW(); into mysql, I get the correct time. So I guess SET time_zone is an offset based on UTC.
I've tried to change my local timezone too and on my localhost, everything is works (my location in Indonesia). All i do is change system/startup line 50 into : date_default_timezone_set('Asia/Jakarta');
But when i tried to applied the timezone on my hosting (My hosting on namecheap, server located on UK), the code doesnt work
Have tried to contact the technical support but it seems like they dont know the problem also.
Please can anybody help me about this ? Is there some additional code that i have to put on my server hosting ?
Thanks a lot before ~
None of that is a fault of any version of OC. None of it is done by any version of OC except by way of any gui settings or hard code that may impose an offset. The php lingo for timezones used to be what everybody else who is serious still uses, gmt+/-n or utc/cust/zulu equivalents, but php.exe was redone to use instead region/city. Which lingo works, no matter how perfect its syntax may be, depends upon which php.exe version is in effect -- old enough php.exe will consider new time to be an error, and new enough php.exe will consider old time to be deprecated and error. Some of you will be dealing with php.exe ranging even back into 4.x or somewhere through 5.x, and will need the right vintage of tricks.
. . . Just went back and dredged up the link:
how: upload into /admin/, address it as http: // [...]/admin/phpinfo.php in browser address bar
Users browsing this forum: No registered users and 71 guests