I am not sure what could be a problem but my Gibbon installation show wrong time.
Active session show correct time. But logs show two hours different.
Log Time
Active session Time
Any idea what could be a problem?
Thanks
I am not sure what could be a problem but my Gibbon installation show wrong time.
Active session show correct time. But logs show two hours different.
Log Time
Active session Time
Any idea what could be a problem?
Thanks
Hi @calx This is odd, as they should certainly be the same thing. I had a look at the code, and I can see that log times are being created automatically with the CURRENT_TIMESTAMP in MySQL, whereas session timestamps are created from PHP. While these should be the same, it suggests that perhaps your MySQL server has a different time. If you have access to run commands on MySQL, you could run SELECT NOW()
and see if the result is accurate or two hours different.
Hi Sandra.
MySQL server has different time zone
Is there anyway to force MySQL server to use time zone set in Gibbon settings?
Thanks
HI @calx The solution would likely be server-side, so there are some suggestions in this Stackoverflow thread that may help: timezone - How do I set the time zone of MySQL? - Stack Overflow
One other option, if you don’t have access to change the server, could be to add the following line to the very bottom of your gibbon.php file
$pdo->statement("SET time_zone='+10:00';");
Where +10:00 is whatever your current timezone offset is. This will change the timezone offset for every MySQL session in Gibbon. Let me know if you try this, perhaps we can build in a setting to override the MySQL timezone when needed.
Hi @sandra
Thanks for your replay.
That worked. But after changes i made to gibbon.php i start getting this notification.
Hmm, that is strange. Perhaps its just in the session cookie, and once you clear the session the timeout will reset. Otherwise, you can find the timeout setting in System Admin > Security & Privacy Settings and perhaps increasing it accordingly.