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
It seems Chronos::setTestNow() only fixates the time and not the rest of a date, is that intended?
For example, when using Chronos::createFromFormat() with a partial format, things like the day and month are not fixated:
Chronos::setTestNow(newChronos('2020-12-01 00:00:00'));
$date = Chronos::createFromFormat('m-d', '10-5'); // I would expect this to become "2020-10-05 00:00:00$date = Chronos::createFromFormat('d', '5'); // I would expect this to become "2020-12-05 00:00:00
This is using the default behavior of DateTimeImmutalbe;:createFromFormat(). I don't think we'll be able to detect a time component wasn't included in the format.
It seems Chronos::setTestNow() only fixates the time and not the rest of a date, is that intended?
For example, when using Chronos::createFromFormat() with a partial format, things like the day and month are not fixated:
Note this is similar to briannesbitt/Carbon#1280
The text was updated successfully, but these errors were encountered: