Skip to content

Commit

Permalink
Merge pull request #2 from andrewghobrial/master
Browse files Browse the repository at this point in the history
fix bug where sessions are deleted immediately if your timezone is we…
  • Loading branch information
nwmac committed May 15, 2018
2 parents 3f93bd4 + 1a9dd2b commit ea2757e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (m *SqliteStore) cleanup(interval time.Duration, quit <-chan struct{}, done

// deleteExpired deletes expired sessions from the database.
func (m *SqliteStore) deleteExpired() error {
var deleteStmt = "DELETE FROM " + m.table + " WHERE expires_on < datetime('now')"
var deleteStmt = "DELETE FROM " + m.table + " WHERE expires_on < datetime(CURRENT_TIMESTAMP,'localtime')"
_, err := m.db.Exec(deleteStmt)
return err
}

0 comments on commit ea2757e

Please sign in to comment.