-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Incorrect Parse of 0001-01-01 00:00:00 #232
Comments
After testing, in golang, |
This looks very wrong. According to AI:
|
We should add support for '0001-01-01 00:00:00' to Carbon, as it is a valid datetime, and can be saved in i.e. MySQL. For instance, when getting the data from the database it reads as '0001-01-01 00:00:00', but once it is passed into Carbon it gets blank. |
Your tests will pass if you update the time layout: |
The layout does not match the time string,the layout contains a time zone, but the time string does not |
Sorted by using 0002-01-01 00:00:00 which is the earliest valid date |
V2.3.11 has been optimized and released |
Hello,
I encountered an issue with the following code:
golang version: 1.22 (latest)
carbon version: 2.3.10 (latest)
time zone: GMT
I expected to get:
But I actually get:
Example of issue:
https://play.golang.com/p/L6HDUXlCDEz
How it is supposed to work:
Thanks!
The text was updated successfully, but these errors were encountered: