Jump to content

Session Handler Database: times out by two hours


Robin S
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...