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:
umang@ancient:~$ date +%s 1282367908 umang@ancient:~$ date -d 1282367908 date: invalid date `1282367908' umang@ancient:~$ date -d +1282367908 date: invalid date `+1282367908' umang@ancient:~$ date +%s -d +1282367908 date: invalid date `+1282367908' I'd like to be able to get output like:
umang@ancient:~$ TZ=UTC somecommand 1282368345 Sat Aug 21 05:25:46 UTC 2010 TIA