Year 2038 Problem
Czech Post has extended the default duration of the PDZ credit from 5 to 99 years.
The data structure struct timeval
still exerts the 2038 problem.
More detailed description:
Windows 32-bit:
-
sizeof(time_t) == 4
;mktime()
doesn't work past year 2038. - When using
CPPFLAGS=-D__MINGW_USE_VC2005_COMPAT
:sizeof(time_t) == 8
;mktime()
works past year 2038. -
struct timeval { long tv_sec; long tv_usec; };
- Qt-based
mktime()
alternative works past year 2038.
Windows 64-bit:
-
sizeof(time_t) == 8
;mktime()
works past year 2038. -
struct timeval { long tv_sec; long tv_usec; };
- Qt-based
mktime()
alternative works past year 2038.
FeeBSD 13.0 i386:
-
sizeof(time_t) == 4
;mktime()
doesn't work past year 2038. -
struct timeval { time_t tv_sec; suseconds_t tv_usec; };
- Qt-based
mktime()
alternative works past year 2038.
FeeBSD 13.0 amd64:
-
sizeof(time_t) == 8
;mktime()
doesn't work past year 2038. -
struct timeval { time_t tv_sec; suseconds_t tv_usec; };
- Qt-based
mktime()
alternative works past year 2038.
OpenSUSE Tumbleweed i586:
-
sizeof(time_t) == 4
;mktime()
doesn't work past year 2038. -
struct timeval { __time_t tv_sec; __suseconds_t tv_usec; };
- Qt-based
mktime()
alternative works past year 2038.
Mac OS X 10.11.6 (32-bit app):
-
sizeof(time_t) == 4
;mktime()
doesn't work past year 2038. -
#define _STRUCT_TIMEVAL struct timeval _STRUCT_TIMEVAL { __darwin_time_t tv_sec; __darwin_suseconds_t tv_usec; };
- Qt-based
mktime()
alternative works past year 2038.
Mac OS X 10.11.6 (64-bit app):
-
sizeof(time_t) == 8
;mktime()
works past year 2038. -
#define _STRUCT_TIMEVAL struct timeval _STRUCT_TIMEVAL { __darwin_time_t tv_sec; __darwin_suseconds_t tv_usec; };
macOS 10.14 (64-bit app):
-
sizeof(time_t) == 8
;mktime()
doesn't work past year 2038. -
#define _STRUCT_TIMEVAL struct timeval _STRUCT_TIMEVAL { __darwin_time_t tv_sec; __darwin_suseconds_t tv_usec; };
- Qt-based
mktime()
alternative works past year 2038.
Conclusion:
Add a callback-function to provide a functional mktime()
alternative for the library.
Explicitly define a struct timeval
replacement and enforce a 64-bit-wide integer to hold the tv_sec
values.