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
DateTimeFormatter creates invalid ISO8601 string #3723
Comments
I really have no time to investigate and fix it, but if you can look deeper (and perhaps if items below from e283643#diff-4ea7e490ca4d6746ecc695f37c15320cc17f3d0cd26a802250b3ccca2565ba13 |
I can do that. Thanks for pointing out related items.
V pet., 29. jul. 2022 15:41 je oseba Aleksandar Fabijanic <
***@***.***> napisala:
… I really have no time to investigate and fix it, but if you can look
deeper (and perhaps if items below from develop-experimental are somehow
related), and send a pull, I'll schedule this for 1.13:
#569 <#569>
e283643
#diff-4ea7e490ca4d6746ecc695f37c15320cc17f3d0cd26a802250b3ccca2565ba13
<e283643#diff-4ea7e490ca4d6746ecc695f37c15320cc17f3d0cd26a802250b3ccca2565ba13>
—
Reply to this email directly, view it on GitHub
<#3723 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVM75G2PGDV26H5ILCZNVDVWPNSFANCNFSM55AOVRKQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Poco::DateTime class stores a date/time in two forms (UTC and broken down). The UTC form starts from beginning of Gregorian calender with 100 nanosecond resolution. The value is negative for dates before October 15, 1582. Its used to update hour, miunute, second,... values in DateTime::computeDaytime() producing negative values. |
Describe the bug
Crating a Poco::Timestamp from Poco::DateTime and using Poco::DateTimeFormatter::format() creates invalid ISODate with negative hour, minute and second values for timestamps before October 15, 1582.
To Reproduce
Expected behavior
Expected result is "1582-10-14T00:00:01.000000Z" instead of "1582-10-14T-23:-59:-59.000000Z" which is invalid ISODate.
Logs
If applicable, add logs to help explain your problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Please add relevant environment information:
Additional context
I'm not sure if this is a bug or limitation of allowed Poco::Timestamp date range. Interesting is that the year, month and date are properly formatted from Poco::Timestamp value and just the hour, minute and second become negative.
The text was updated successfully, but these errors were encountered: