-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chronos::createFromFormat using a date without time does not respect Chronos::setTestNow #452
Comments
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. |
@othercorey thanks for the swift response. Indeed the native Maybe this can be used as inspiration: briannesbitt/Carbon#1281 Which seem to have landed here after 6 years: https://github.com/briannesbitt/Carbon/blob/8275fbf2f47c8a792cda010d56b7fe62c3eeafbb/src/Carbon/Traits/Creator.php#L602-L613 |
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: