Search code examples
linuxcentostimestampcentos7unix-timestamp

Convert timestamp in linux


I have a date represented as 1231533845

I understand that is supposed to be Fri Jan 9 15:44:05 EST 2009

And that on OSX it can be decoded with: date -j -f %s 1231533845

What's the equivalent command on linux?


Solution

  • You will use the date function, but with the option -d date -d @1231533845