Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Converting time formats
Date: Sat, 28 May 2011 17:33:39
Message-Id: 4DE13174.7020200@gmail.com
In Reply to: Re: [gentoo-user] Converting time formats by Alex Schuster
1 Alex Schuster wrote:
2 > Dale asks:
3 >
4 >
5 >> I asked this once before but I can't find it. I have a log file that
6 >> has time stamps that look like this:
7 >>
8 >> lastrun = 1306574899
9 >>
10 >> What do I use to get the human time for that? I thought it was the date
11 >> command but I couldn't find it in the man page. I tried google but I
12 >> can't recall what that time stamp is called either so not sure what to
13 >> search for.
14 >>
15 > It's seconds since 1970. You can convert them like this:
16 > date -d @1306574899
17 >
18 > Wonko
19 >
20 >
21
22 So it was the -d option. I thought that was it but I missed the @
23 sign. I added that to my list of common commands so I won't forget.
24
25 Thanks much for both replies.
26
27 Dale
28
29 :-) :-)