From the course: Linux Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

UNIX time and the 2038 problem

UNIX time and the 2038 problem - Linux Tutorial

From the course: Linux Tips

UNIX time and the 2038 problem

- [Instructor] Unix and Linux systems keep track of time by counting the seconds since January 1st 1970 UTC, or Coordinated Universal Time. That number of second is called Unix time or Epoch time. Working with this number can be a little tricky. Since it's not represented as a human readable date. There are websites that convert back and forth between Epoch time and various date strings, and the date utility can help us out with that as well. Historically the Epoch time is stored as a 32-bit signed integer. Here's an example of what that looks like in binary. We can see the current local Unix time with a date command, and a format string representing seconds. We can also get the current UTC time by adding the -U option. And we can get the Unix time for a specific date with a date command, a formatted string with the seconds, the UTC option, and the date option. And for the date option I'll provide a date. We can add times…

Contents