Hi folks.
I'm facing a strange issue with my db. When someone visits any page of the eshop, the time of visit is stored in date_added column of customer_online table. My problem is that always wrong time is stored, by 1h & 20min. The date is OK. For example the correct time is 13.10' but it stores 14.30'. With a custom php page i made, i can store in another table the correct time, so there is nothing to do with server time. Also if someone orders a product , same thing happens to order table.
I tryed to modify the startup.php page of system folder the date_default_timezone_set('UTC'); but no luck. When i change the value of ...`date_added` = NOW()"); in online.php page at ./catalog/model/tool folder, with
...`date_added` = 2015-02-24 13:14:54"); database is accepted the record as normal. I tryed to remove the `date_added` = NOW()"); and change table column type, from datetime to timestamp. No luck. Same wrong time is inserted again.
I use OC v.1.5.6 and same problem happens in 2 same eshops with different domain names. On clean installation there is not any mulfunction and everything is going normal with time of visit.
I believe some mod is causing this wrong time insertion, but i cannot search somewhere else to corrected. Any help is appreciated.
I'm facing a strange issue with my db. When someone visits any page of the eshop, the time of visit is stored in date_added column of customer_online table. My problem is that always wrong time is stored, by 1h & 20min. The date is OK. For example the correct time is 13.10' but it stores 14.30'. With a custom php page i made, i can store in another table the correct time, so there is nothing to do with server time. Also if someone orders a product , same thing happens to order table.
I tryed to modify the startup.php page of system folder the date_default_timezone_set('UTC'); but no luck. When i change the value of ...`date_added` = NOW()"); in online.php page at ./catalog/model/tool folder, with
...`date_added` = 2015-02-24 13:14:54"); database is accepted the record as normal. I tryed to remove the `date_added` = NOW()"); and change table column type, from datetime to timestamp. No luck. Same wrong time is inserted again.
I use OC v.1.5.6 and same problem happens in 2 same eshops with different domain names. On clean installation there is not any mulfunction and everything is going normal with time of visit.
I believe some mod is causing this wrong time insertion, but i cannot search somewhere else to corrected. Any help is appreciated.
Last edited by drest341 on Thu Feb 26, 2015 6:28 pm, edited 1 time in total.
Any fool can write code that a computer can understand. Good programmers write code that humans can understand ~ Martin Fowler.
Try this:
http://www.opencart.com/index.php?route ... n_id=16023
http://www.opencart.com/index.php?route ... n_id=19781
Ernie
bigmax.ch/shop/
http://www.opencart.com/index.php?route ... n_id=16023
http://www.opencart.com/index.php?route ... n_id=19781
Ernie
bigmax.ch/shop/
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
to:IP_CAM
I tryed the first one ext., it displays the wrong time in "admin server tab" as shown in picture, but doesn't correct the problem.
Also to set it up and work, i had to modify the xml the entry in system/library/db.php
from :
"<search position="after"><![CDATA[
function query
]]></search>"
to :
"<search position="after"><![CDATA[
function query($sql) {
]]></search> "
Also in case that a new timezone is selected, never the PHPtime changes again.
I tryed the first one ext., it displays the wrong time in "admin server tab" as shown in picture, but doesn't correct the problem.
Also to set it up and work, i had to modify the xml the entry in system/library/db.php
from :
"<search position="after"><![CDATA[
function query
]]></search>"
to :
"<search position="after"><![CDATA[
function query($sql) {
]]></search> "
Also in case that a new timezone is selected, never the PHPtime changes again.
Any fool can write code that a computer can understand. Good programmers write code that humans can understand ~ Martin Fowler.
Finally i recreated my DBases and in one of my eshop, time is inserted as normal. The 2nd eshop displays now 1 hour minus.
Strange.
Strange.
Any fool can write code that a computer can understand. Good programmers write code that humans can understand ~ Martin Fowler.
Who is online
Users browsing this forum: Bing [Bot] and 127 guests