Commit db1c5ea1 authored by Dan Behrman's avatar Dan Behrman Committed by Jens Segers

Fixed 32-bit integer overflow by allowing UTCDateTime() to get it's own current time (#1127)

parent e4d74282
......@@ -12,7 +12,7 @@ class DatabaseTokenRepository extends BaseDatabaseTokenRepository
*/
protected function getPayload($email, $token)
{
return ['email' => $email, 'token' => $token, 'created_at' => new UTCDateTime(round(microtime(true) * 1000))];
return ['email' => $email, 'token' => $token, 'created_at' => new UTCDateTime(null)];
}
/**
......
......@@ -108,7 +108,7 @@ abstract class Model extends BaseModel
*/
public function freshTimestamp()
{
return new UTCDateTime((int) round(microtime(true) * 1000));
return new UTCDateTime(null);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment