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
take timezone into account #83
Conversation
src/Model/AbstractToken.php
Outdated
@@ -158,15 +159,15 @@ public function getExpiresAt() | |||
*/ | |||
public function getExpiresIn(): int | |||
{ | |||
return $this->expiresAt->getTimestamp() - (new DateTime('now'))->getTimestamp(); | |||
return $this->expiresAt->getTimestamp() - (new DateTime('now', new DateTimeZone(date_default_timezone_get())))->getTimestamp(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go with UTC because of changing time to winter and summertime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Merge when travis is green.
Failed on php7 |
that failure is due to new Date != new Date |
No description provided.