jwt-auth icon indicating copy to clipboard operation
jwt-auth copied to clipboard

DateTime::__construct(): Failed to parse time string

Open didphp opened this issue 3 years ago • 2 comments

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

didphp avatar Mar 16 '21 01:03 didphp

Catch same bug, reason was in jwt config, JWT_TTL was set to 3 thousands years

VPrikalab avatar Nov 21 '21 11:11 VPrikalab

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]

bigdevlarry avatar Aug 01 '22 21:08 bigdevlarry