Gentoo Archives: gentoo-user

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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Time format in log files Etaoin Shrdlu <shrdlu@×××××××××××××.org>