Here's an example of how Arrow uses date.h to get day/month/year from epoch time [1].
[1] https://github.com/apache/arrow/blob/main/cpp/src/arrow/compute/kernels/scalar_temporal_unary.cc#L261-L269 Rok On Mon, Apr 8, 2024 at 1:54 PM David Li <[email protected]> wrote: > The C++ library vendors a backport of C++20's calendar/date operations > [1], you could vendor/use the same library in the driver. > > [1]: https://github.com/HowardHinnant/date > > On Mon, Apr 8, 2024, at 20:41, James Duong via user wrote: > > Arrow date vectors store dates in terms of seconds or days since the epoch. > > > > Is there anything built into the Arrow C++ libraries for decomposing dates > into the day, month, and year? Similar question for Timestamp types. > > > > This is causing a bug with the Arrow Flight SQL ODBC driver, where dates > before the epoch are not correctly handled by gmtime() (where the value in > seconds since the epoch is negative) > > >
