I have a UNIX timestamp and I'd like to get a formatted date (like the output of date
) corresponding to that timestamp.
My attempts so far:
$ date +%s
1282367908
$ date -d 1282367908
date: invalid date `1282367908'
$ date -d +1282367908
date: invalid date `+1282367908'
$ date +%s -d +1282367908
date: invalid date `+1282367908'
I'd like to be able to get output like:
$ TZ=UTC somecommand 1282368345
Sat Aug 21 05:25:45 UTC 2010
info coreutils date
a little more carefully. – Umang Aug 21 '10 at 08:27date -r 1447264553943
results inWed Dec 28 01:39:03 BRST 47831
, when it's actually11/11/2015, 3:55:53 PM GMT-2:00
. – falmp Nov 11 '15 at 18:01