Robin S Posted May 17, 2016 Posted May 17, 2016 I installed the core Session Handler Database module but the times shown are out by two hours. That is, the time for a new login is shown in Session Handler Database as "2 hours ago". Probably a timezone issue, but what setting do I need to adjust to correct this? The timezone in my config is correct.
LostKobrakai Posted May 17, 2016 Posted May 17, 2016 If it's not the php timezone, it could also be the mysql timezone setting. 1
Robin S Posted May 17, 2016 Author Posted May 17, 2016 Thanks, I think you're right. However on a shared server I don't think it's possible to change the MySQL timezone. I found the following suggestion for adjusting the MySQL timezone via PHP: mysql_query("SET time_zone = '-6:00'"); Is there a better way to execute this using one of PW's $database methods? And where would be the right place to put this? In /site/init.php? It would be nice if the Session Handler Database module saved timestamps with PHP's timezone so this wasn't necessary. GitHub issue
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now