Closed JaroslawCendrowski closed 3 months ago
I think this solves the problem for the years between 1800 and 1900, but not those earlier than 1800, right? This is probably better than nothing, but it looks like we could easily solve it for any negative tm_year
in the same way.
But beyond this I also wonder if this actually works in the other backends. It would be great to add a unit test checking for this to the "std::tm" section of the corresponding test in tests/common-tests.h
.
It fixes years starting from 1. Didn't test for years BC yet.
I think this solves the problem for the years between 1800 and 1900, but not those earlier than 1800, right? This is probably better than nothing, but it looks like we could easily solve it for any negative
tm_year
in the same way.But beyond this I also wonder if this actually works in the other backends. It would be great to add a unit test checking for this to the "std::tm" section of the corresponding test in
tests/common-tests.h
.
Test added. It fails with current implementation, works with my changes in standard-use-type.cpp.
I think this solves the problem for the years between 1800 and 1900, but not those earlier than 1800, right? This is probably better than nothing, but it looks like we could easily solve it for any negative
tm_year
in the same way.But beyond this I also wonder if this actually works in the other backends. It would be great to add a unit test checking for this to the "std::tm" section of the corresponding test in
tests/common-tests.h
.
Thanks, I'm (squash) merging this now!
P.S. Oracle "excess-100 notation" is really weird, I wonder who came up with something like this and why.
Solves https://github.com/SOCI/soci/issues/1135