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

[5.2] Use Carbon for everything time related in DatabaseTokenRepository #13234

Merged
merged 2 commits into from
Apr 21, 2016

Conversation

annejan
Copy link
Contributor

@annejan annejan commented Apr 20, 2016

Fixes timezone issues where my tokens had been expired for an hour already as soon as they were issued.
App timezone was CET and token expiry set to 60 minutes.

Fixes timezone issues where my token had been expired for an hour already as soon as they were issued.
App timezone was CET and token expiry set to 60 minutes.
@annejan annejan changed the title Use Carbon for everything time related [5.2] Use Carbon for everything time related Apr 20, 2016
@annejan annejan changed the title [5.2] Use Carbon for everything time related [5.2] Use Carbon for everything time related in DatabaseTokenRepository Apr 20, 2016
protected function getCurrentTime()
{
return time();
return $expiresAt->lt(new Carbon);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do Carbon::now() here just so the behavior is clear?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe just $expiresAt->isPast()?

@taylorotwell taylorotwell merged commit c16f026 into laravel:5.2 Apr 21, 2016
@annejan annejan deleted the patch-1 branch April 21, 2016 13:33
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

Successfully merging this pull request may close these issues.

3 participants