What do people think about to offer a new set of modules that use
64-bit integers for time representation?

I'm thinking a time64.h:

#include <stdint.h>
typedef int64_t time64_t;
struct tm *gmtime_r(const time64_t *timep, struct tm *result);
struct tm *localtime_r(const time64_t *timep, struct tm *result);
time64_t mktime(struct tm *tm);

With this module, packages that need support for years >2038 can use
do this now, instead of waiting for time_t to be made larger in the
compiler/OS they use.

(This opens up for a time128_t if someone is bothered by the
292471210647 year problem inherent with 64-bit times...)

/Simon


Reply via email to