3 ms·
Is 2038 the end of a signed int? If so, can't we just make it unsigned and buy ourselves another 70 years or so? I don't know how much of an issue not being abl
by pkulak 10y ago
Is 2038 the end of a signed int? If so, can't we just make it unsigned and buy ourselves another 70 years or so? I don't know how much of an issue not being able to represent time before 1970 is, but for timestamps that doesn't seem like it would be an issue.
- Zitrax 10y agoThat would break systems that relies on time stamps earlier than 1970 though. int main(void) { time_t epoch = -100; printf("%s", asctime(gmtime(&epoch))); } The above would for example print a time in 1969.
- jayflux 10y agohttps://en.wikipedia.org/wiki/Year_2038_problem https://en.wikipedia.org/wiki/Year_2038_problem explains pretty well why that wouldn't work and other solutions tried