Gentoo Archives: gentoo-user

From: Etaoin Shrdlu <shrdlu@×××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Time format in log files
Date: Mon, 28 Jan 2008 09:20:54
Message-Id: 200801281033.01894.shrdlu@unlimitedmail.org
In Reply to: Re: [gentoo-user] Time format in log files by Mick
1 On Sunday 27 January 2008, Mick wrote:
2 > On Sunday 27 January 2008, Greg Bowser wrote:
3 > > Hi,
4 > > Those dates are in a format called "unix timestamps", which
5 > > represent the number of seconds since the unix epoch (Jaunuary 1st,
6 > > 1970). You can get the current unix timestamp via the date command
7 > > (date +%s). As far as any command-line utility to convert them,I
8 > > leave that to Google. However, most programming languages provide
9 > > functions to convert between timestamp formats.
10 >
11 > Thanks Greg,
12 >
13 > It's amazing what one can dig out from Google:
14 >
15 > perl -pe 's/(\d+)/localtime($1)/e' /var/log/<logfile_name>
16
17 I like this one too:
18
19 # date -d @1200806556
20 Sun Jan 20 06:22:36 CET 2008
21 --
22 gentoo-user@l.g.o mailing list