-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Carbon parse behaviour differs from native DateTime #3113
Comments
Hello, 👋 thanks for the report.
And creating a date from Library should not open door to ambiguity by relaxing method to meaningless types. If this is what you mean then you should explicitly cast your value with |
I stumbled across the behaviours revisiting some Eloquent ORM code which made use of Carbon in a where clause to query the db. Would have expected that |
Hello, I cannot find Did you mean code using Eloquent in your app? If you found code that is calling Either app or third-party, recommendation would be the same:
|
Hello,
I encountered an issue with the following code:
Carbon version: 3.8.0
PHP version: PHP 8.3.13
I expected to get:
Native PHP DateTime gives me:
For
false
:For
true
:But I actually get:
This was executed inside a docker container which runs a laravel app (therefore carbon is installed as dep of laravel/framwork v11.29.0)
I prosposed a PR with a change that would reflect the behaviour of PHP native DateTime: #3112
Thanks!
The text was updated successfully, but these errors were encountered: