Hacker News new | past | comments | ask | show | jobs | submit login

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.



That 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.


https://en.wikipedia.org/wiki/Year_2038_problem explains pretty well why that wouldn't work and other solutions tried




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: