Is there any C++ implementation of 64-bit Unix timestamp conversions for 32-bit systems? I need to convert struct tm to 64-bit integer and vice versa, including leap years, time zones, UTC. Also need it portable, at least for GNU/Linux and Windows.
Is there any C++ implementation of 64-bit Unix timestamp conversions for 32-bit systems? I
Share
You need:
Originally (in 2011) this answer contained links to 2038bug.com where it was possible to download the small
pivotal_gmtime_rlibrary, containing the mentioned functions. The library has been removed from 2038bug.com back then, the links became broken and were removed from the answer by a moderator. Seems like thatpivotal_gmtime_rcode can now be found here:https://github.com/franklin373/mortage/tree/master/time_pivotal
Also, I’ve found another, more recent library, called
y2038, that also implementsmktime64andlocaltime64_r:https://github.com/evalEmpire/y2038