Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTimeTZ Mysql read vs write incorrect token expiry #18

Open
basz opened this issue Apr 28, 2017 · 0 comments
Open

DateTimeTZ Mysql read vs write incorrect token expiry #18

basz opened this issue Apr 28, 2017 · 0 comments

Comments

@basz
Copy link
Collaborator

basz commented Apr 28, 2017

We recently switched to calulating token expirey datetime’s to store as UTC. When the doctrine adapter loads the datetime back from db (and using mysql which doesn’t store the tz in the db) the date i get back are reconsituted in the local tz. Would you recommend the application should also run in UTC? Or the database with [mysqld] default-time-zone='+00:00’ Tokens (especially authorization code) are expired too soon… Should definitely switch the doctrine xml datetime to datetimetz but (as said) doesn’t help when using mysql...

Reading this http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/working-with-datetime.html#default-timezone-gotcha I think manually setting the date_default_timezone_set to utc before each read and then back its original is the only correct way.

basz added a commit to basz/zfr-oauth2-server-doctrine that referenced this issue Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant