You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an issue when I want to instantiate a DateTime using the createFromFormat method if I specify the format as now and the datetime as a date with no time (ex: 2022-08-04).
Hello,
I'm having an issue when I want to instantiate a
DateTime
using thecreateFromFormat
method if I specify the format asnow
and the datetime as a date with no time (ex: 2022-08-04).Example:
Output:
Expected:
The
createFromFormat
method must return false if the date doesn't match the format.Solution:
Do not try to set the time when
\DateTime::createFromFormat
returns false.In src/ClockMock.php:
Replace
With:
~ faille76
The text was updated successfully, but these errors were encountered: