jwt-auth
jwt-auth copied to clipboard
DateTime::__construct(): Failed to parse time string
Subject of the issue
Describe your issue here.
Your environment
Q | A |
---|---|
Bug? | no / yes |
New Feature? | no / yes |
Framework | Laravel |
Framework version | 8.5.10 |
Package version | 1.0.0 ~ 2.0.x-dev |
PHP version | 7.3 |
Steps to reproduce
use JWT to generate the token
Expected behaviour
Carbon\Exceptions\InvalidFormatException: DateTime::__construct(): Failed to parse time string (21034-06-13 12:16:21.000000) at position 12 (1): Double time specification in file E:\project\vendor\nesbot\carbon\src\Carbon\Traits\Creator.php on line 87
Actual behaviour
Debug the code, the timezone is UTC, but in app/config.php is not UTC
Catch same bug, reason was in jwt config, JWT_TTL was set to 3 thousands years
Finally found a fix. I had to upgrade my valet for the service I'm using for jwt to 8.1
cd auth-service
valet isolate [email protected]