Date error - Failed to parse time string (-001-11-30T00:00:00-05:00) at position 7 (-): Double timezone specification")
I just upgraded From twig v1.14.0 to v1.14.1 and i now get the following error:
An exception has been thrown during the rendering of a template ("DateTime::__construct(): Failed to parse time string (-001-11-30T00:00:00-05:00) at position 7 (-): Double timezone specification")
The markup i'm using is simply:
{{ user.created|date('m/d/Y') }}
The data that it is failing on is loaded from a datetime field with value 0000-00-00 00:00:00
public 'created' (Object) stdClass
public '__CLASS__' (String, 8 characters ) DateTime
public 'date' (String, 25 characters ) -001-11-30T00:00:00-05:00
public 'timezone' (String, 16 characters ) America/New_York
I'm assuming this problem has to do with the added support for PHP 5.5 DateTimeInterface in 14.1
Is '11/30/-0001' your expected result of {{ user.created|date('m/d/Y') }}, or any other?
I didn't have any specific expectations since its a garbage date anyway. As long as it doesn't crash, whatever you think is the most logical output is great. Thanks!