Re: HowTo convert "seconds since `00:00:00 1970-01-01 UTC" into a human readable date

From: gmt (gmt_at_gotmail.com)
Date: 04/15/04

  • Next message: Bill Marcum: "Re: HowTo convert "seconds since `00:00:00 1970-01-01 UTC" into a human readable date"
    Date: Thu, 15 Apr 2004 01:26:31 GMT
    
    

    Hermann Peifer wrote:

    > Hi All,
    > I have a list with timestamps expressed as
    > "seconds since `00:00:00 1970-01-01 UTC", see here:
    > 1081784658
    > ...
    > I would like to convert them into human readable dates, e.g.
    >
    > 2004-04-13 20:06:37
    >
    > IMHO, the solution seems to be around strftime() or strptime() functions,
    > but I don't manage to get it right.
    >
    > Any solution is welcome, preferably a simple one, e.g. a shell oneliner.

    just use date :)

    inode@breadbox:~$ date -d '1970-01-01 1081784658 sec' +"%Y-%m-%d %T %z"
    2004-04-12 15:44:18 +0100


  • Next message: Bill Marcum: "Re: HowTo convert "seconds since `00:00:00 1970-01-01 UTC" into a human readable date"