-
Notifications
You must be signed in to change notification settings - Fork 107
Description
In https://github.com/thephpleague/openapi-psr7-validator/blob/master/src/Schema/TypeFormats/StringDateTime.php the four allowed formats are declared, which a passed date-time string should match.
According to the DateTimeInterface documentation the P in Y-m-d\TH:i:sP stands for
Difference to Greenwich time (GMT) with colon between hours and minutes
where an O would stand for
Difference to Greenwich time (GMT) without colon between hours and minutes
If I pass 2025-05-28T17:39:00+0200 (without colon) the method still returns true, since it would match the first format Y-m-d\TH:i:sP.
Why? I expected to return "false" since it does not match one of the declared formats.
I also checked the RFC3339 reference which leads to timezone offset with colons.