SOCI / soci

Official repository of the SOCI - The C++ Database Access Library
http://soci.sourceforge.net/
Boost Software License 1.0
1.37k stars 472 forks source link

Dates before year 1900 stored in Oracle as one hundred years earlier. #1135

Closed JaroslawCendrowski closed 3 months ago

JaroslawCendrowski commented 3 months ago

Observed on table with TIMESTAMP column type. tm_year component of std::tm structure is negative then. The solution is to use Euclidean modulo instead of % operator when converting from std::tm to Oracle type..

vadz commented 3 months ago

Sorry, not on a Oracle expert by any means, so I don't really know what's going on here. If you can propose a PR fixing this, please do.

Edit: I didn't notice that you already did, thanks!