* [gentoo-user] Converting time formats
@ 2011-05-28 16:37 Dale
2011-05-28 16:45 ` [gentoo-user] " Nikos Chantziaras
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Dale @ 2011-05-28 16:37 UTC (permalink / raw
To: Gentoo User
I asked this once before but I can't find it. I have a log file that
has time stamps that look like this:
lastrun = 1306574899
What do I use to get the human time for that? I thought it was the date
command but I couldn't find it in the man page. I tried google but I
can't recall what that time stamp is called either so not sure what to
search for.
Could someone enlighten me a little bit here?
Thanks.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-user] Re: Converting time formats
2011-05-28 16:37 [gentoo-user] Converting time formats Dale
@ 2011-05-28 16:45 ` Nikos Chantziaras
2011-05-28 16:50 ` [gentoo-user] " Alex Schuster
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Nikos Chantziaras @ 2011-05-28 16:45 UTC (permalink / raw
To: gentoo-user
On 05/28/2011 07:37 PM, Dale wrote:
> I asked this once before but I can't find it. I have a log file that has
> time stamps that look like this:
>
> lastrun = 1306574899
>
> What do I use to get the human time for that? I thought it was the date
> command but I couldn't find it in the man page. I tried google but I
> can't recall what that time stamp is called either so not sure what to
> search for.
>
> Could someone enlighten me a little bit here?
date -d @1306574899
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-28 16:37 [gentoo-user] Converting time formats Dale
2011-05-28 16:45 ` [gentoo-user] " Nikos Chantziaras
@ 2011-05-28 16:50 ` Alex Schuster
2011-05-28 17:31 ` Dale
2011-05-28 17:30 ` Florian Philipp
2011-05-29 0:48 ` William Kenworthy
3 siblings, 1 reply; 16+ messages in thread
From: Alex Schuster @ 2011-05-28 16:50 UTC (permalink / raw
To: gentoo-user
Dale asks:
> I asked this once before but I can't find it. I have a log file that
> has time stamps that look like this:
>
> lastrun = 1306574899
>
> What do I use to get the human time for that? I thought it was the date
> command but I couldn't find it in the man page. I tried google but I
> can't recall what that time stamp is called either so not sure what to
> search for.
It's seconds since 1970. You can convert them like this:
date -d @1306574899
Wonko
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-28 16:37 [gentoo-user] Converting time formats Dale
2011-05-28 16:45 ` [gentoo-user] " Nikos Chantziaras
2011-05-28 16:50 ` [gentoo-user] " Alex Schuster
@ 2011-05-28 17:30 ` Florian Philipp
2011-05-29 0:48 ` William Kenworthy
3 siblings, 0 replies; 16+ messages in thread
From: Florian Philipp @ 2011-05-28 17:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
Am 28.05.2011 18:37, schrieb Dale:
> I asked this once before but I can't find it. I have a log file that
> has time stamps that look like this:
>
> lastrun = 1306574899
>
> What do I use to get the human time for that? I thought it was the date
> command but I couldn't find it in the man page. I tried google but I
> can't recall what that time stamp is called either so not sure what to
> search for.
>
> Could someone enlighten me a little bit here?
>
> Thanks.
>
> Dale
>
> :-) :-)
>
date --date=@1306574899
looks sensible. I've found this on the info page:
`info date` -> "Date input formats" -> "Seconds since the Epoch"
Hope this helps,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-28 16:50 ` [gentoo-user] " Alex Schuster
@ 2011-05-28 17:31 ` Dale
0 siblings, 0 replies; 16+ messages in thread
From: Dale @ 2011-05-28 17:31 UTC (permalink / raw
To: gentoo-user
Alex Schuster wrote:
> Dale asks:
>
>
>> I asked this once before but I can't find it. I have a log file that
>> has time stamps that look like this:
>>
>> lastrun = 1306574899
>>
>> What do I use to get the human time for that? I thought it was the date
>> command but I couldn't find it in the man page. I tried google but I
>> can't recall what that time stamp is called either so not sure what to
>> search for.
>>
> It's seconds since 1970. You can convert them like this:
> date -d @1306574899
>
> Wonko
>
>
So it was the -d option. I thought that was it but I missed the @
sign. I added that to my list of common commands so I won't forget.
Thanks much for both replies.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-28 16:37 [gentoo-user] Converting time formats Dale
` (2 preceding siblings ...)
2011-05-28 17:30 ` Florian Philipp
@ 2011-05-29 0:48 ` William Kenworthy
2011-05-29 2:28 ` Dale
` (2 more replies)
3 siblings, 3 replies; 16+ messages in thread
From: William Kenworthy @ 2011-05-29 0:48 UTC (permalink / raw
To: gentoo-user
On Sat, 2011-05-28 at 11:37 -0500, Dale wrote:
> I asked this once before but I can't find it. I have a log file that
> has time stamps that look like this:
>
> lastrun = 1306574899
>
> What do I use to get the human time for that? I thought it was the date
> command but I couldn't find it in the man page. I tried google but I
> can't recall what that time stamp is called either so not sure what to
> search for.
>
> Could someone enlighten me a little bit here?
>
> Thanks.
>
> Dale
>
> :-) :-)
>
As well as your other replies, check out ccze
rattus ~ # esearch ccze
[ Results for search key : ccze ]
[ Applications found : 1 ]
* app-admin/ccze
Latest version available: 0.2.1-r2
Latest version installed: 0.2.1-r2
Size of downloaded files: 136 kB
Homepage: http://dev.gentoo.org/~joker/ccze/ccze.txt
Description: A flexible and fast logfile colorizer
License: GPL-2
Pass your log through it for nicely coloured text (words like "alarm"
and "error" are bright red to stand out) as well as converting date
epoch on the fly, leaving it in context.
BillK
--
William Kenworthy <billk@iinet.net.au>
Home in Perth!
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 0:48 ` William Kenworthy
@ 2011-05-29 2:28 ` Dale
2011-05-29 10:10 ` Neil Bothwick
2011-05-29 22:18 ` Henry Gebhardt
2011-05-29 10:08 ` Mick
2011-05-29 13:47 ` Peter Humphrey
2 siblings, 2 replies; 16+ messages in thread
From: Dale @ 2011-05-29 2:28 UTC (permalink / raw
To: gentoo-user
William Kenworthy wrote:
> As well as your other replies, check out ccze
>
> rattus ~ # esearch ccze
> [ Results for search key : ccze ]
> [ Applications found : 1 ]
>
> * app-admin/ccze
> Latest version available: 0.2.1-r2
> Latest version installed: 0.2.1-r2
> Size of downloaded files: 136 kB
> Homepage: http://dev.gentoo.org/~joker/ccze/ccze.txt
> Description: A flexible and fast logfile colorizer
> License: GPL-2
>
>
> Pass your log through it for nicely coloured text (words like "alarm"
> and "error" are bright red to stand out) as well as converting date
> epoch on the fly, leaving it in context.
>
> BillK
>
>
>
This was a pfl log. It doesn't contain all that. I used to run it
manually but found that cron was set up to run it automajically. Thing
is, I wasn't sure how to tell if it was working so I checked the log
file. Well, the time stamp was not for human consumption, sort of like
those little silicone bags in electronic stuff. That lead me to reading
the date man page which I was pretty sure was the key but just missed
one important detail, the little @ sign.
Funny the things we run into sometimes. I did add the command to my
freq-commands file tho.
"This is how you convert time from the log files to human time. Don't
forget the @ sign.
date -d @<insert time stamp here> "
I went back to the man page, it sort of left the @ out on mine:
-d, --date=STRING
display time described by STRING, not `now'
No mention of the @ sign there. It does say to read the info file but I
very rarely get into those. I never have had any good luck with them.
I felt like I was in Hotel California once before. O_O I couldn't get
out. lol
Dale
:-) :-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 0:48 ` William Kenworthy
2011-05-29 2:28 ` Dale
@ 2011-05-29 10:08 ` Mick
2011-05-29 13:07 ` William Kenworthy
2011-05-29 13:47 ` Peter Humphrey
2 siblings, 1 reply; 16+ messages in thread
From: Mick @ 2011-05-29 10:08 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1397 bytes --]
On Sunday 29 May 2011 01:48:17 William Kenworthy wrote:
> On Sat, 2011-05-28 at 11:37 -0500, Dale wrote:
> > I asked this once before but I can't find it. I have a log file that
> > has time stamps that look like this:
> >
> > lastrun = 1306574899
> >
> > What do I use to get the human time for that? I thought it was the date
> > command but I couldn't find it in the man page. I tried google but I
> > can't recall what that time stamp is called either so not sure what to
> > search for.
> >
> > Could someone enlighten me a little bit here?
> >
> > Thanks.
> >
> > Dale
> >
> > :-) :-)
>
> As well as your other replies, check out ccze
>
> rattus ~ # esearch ccze
> [ Results for search key : ccze ]
> [ Applications found : 1 ]
>
> * app-admin/ccze
> Latest version available: 0.2.1-r2
> Latest version installed: 0.2.1-r2
> Size of downloaded files: 136 kB
> Homepage: http://dev.gentoo.org/~joker/ccze/ccze.txt
> Description: A flexible and fast logfile colorizer
> License: GPL-2
>
>
> Pass your log through it for nicely coloured text (words like "alarm"
> and "error" are bright red to stand out) as well as converting date
> epoch on the fly, leaving it in context.
>
> BillK
Hmm ....
"This project is no longer maintained. There's no valid homepage left."
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 2:28 ` Dale
@ 2011-05-29 10:10 ` Neil Bothwick
2011-05-29 13:55 ` Dale
2011-05-29 22:18 ` Henry Gebhardt
1 sibling, 1 reply; 16+ messages in thread
From: Neil Bothwick @ 2011-05-29 10:10 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
On Sat, 28 May 2011 21:28:47 -0500, Dale wrote:
> No mention of the @ sign there. It does say to read the info file but
> I very rarely get into those. I never have had any good luck with
> them. I felt like I was in Hotel California once before. O_O I
> couldn't get out.
I thought you were a KDE user? Press Alt-F2, enter info:/date, enjoy :)
--
Neil Bothwick
WinErr 00E: Window open - Do not look inside
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 10:08 ` Mick
@ 2011-05-29 13:07 ` William Kenworthy
0 siblings, 0 replies; 16+ messages in thread
From: William Kenworthy @ 2011-05-29 13:07 UTC (permalink / raw
To: gentoo-user
...
> >
> > * app-admin/ccze
> > Latest version available: 0.2.1-r2
> > Latest version installed: 0.2.1-r2
> > Size of downloaded files: 136 kB
> > Homepage: http://dev.gentoo.org/~joker/ccze/ccze.txt
> > Description: A flexible and fast logfile colorizer
> > License: GPL-2
> >
> >
> > Pass your log through it for nicely coloured text (words like "alarm"
> > and "error" are bright red to stand out) as well as converting date
> > epoch on the fly, leaving it in context.
> >
> > BillK
>
> Hmm ....
>
> "This project is no longer maintained. There's no valid homepage left."
Interesting! - it still works though, and for such a simple utility, I
dont really care about its maintenance status as long as it keeps
working :)
BillK
--
William Kenworthy <billk@iinet.net.au>
Home in Perth!
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 0:48 ` William Kenworthy
2011-05-29 2:28 ` Dale
2011-05-29 10:08 ` Mick
@ 2011-05-29 13:47 ` Peter Humphrey
2 siblings, 0 replies; 16+ messages in thread
From: Peter Humphrey @ 2011-05-29 13:47 UTC (permalink / raw
To: gentoo-user
On Sunday 29 May 2011 01:48:17 William Kenworthy wrote:
> As well as your other replies, check out ccze
[...]
> Pass your log through it for nicely coloured text (words like "alarm"
> and "error" are bright red to stand out) as well as converting date
> epoch on the fly, leaving it in context.
That looked interesting, so I tried it. I got the following from "cat
/var/log/emerge.log | ccze -C | tail" (sorry about the line wraps, which for
some reason I can't switch off at the moment in kmail). Not only did it not
convert the timestamps; it overwrote my command. I did get colours though.
1306665698: *** exiting unsuccessfully with status 'None'. g/emerge.log |
ccze -C | tail
1306665698: *** terminating.
1306675942: Started emerge on: May 29, 2011 14:32:22
1306675942: *** emerge --jobs --buildpkg --keep-going --verbose --nospinner
--with-bdeps --ask
ccze
1306675947: >>> emerge (1 of 1) app-admin/ccze-0.2.1-r2 to /
1306675947: === (1 of 1) Cleaning (app-admin/ccze-0.2.1-
r2::/usr/portage/app-admin/ccze/ccze-0.
2.1-r2.ebuild)
1306675952: === (1 of 1) Compiling/Packaging (app-admin/ccze-0.2.1-
r2::/usr/portage/app-admin/c
cze/ccze-0.2.1-r2.ebuild)
1306675965: === (1 of 1) Merging (app-admin/ccze-0.2.1-
r2::/usr/portage/app-admin/ccze/ccze-0.2
.1-r2.ebuild)
1306675968: >>> AUTOCLEAN: app-admin/ccze:0
1306675969: === (1 of 1) Updating world file (app-admin/ccze-0.2.1-r2)
1306675969: === (1 of 1) Post-Build Cleaning (app-admin/ccze-0.2.1-
r2::/usr/portage/app-admin/c
cze/ccze-0.2.1-r2.ebuild)
1306675969: ::: completed emerge (1 of 1) app-admin/ccze-0.2.1-r2 to /
1306675969: *** Finished. Cleaning up...
1306675970: *** exiting successfully.
1306675970: *** terminating.
(Something is weird on this box. I posted recently about lockups in flash,
but I now get them at random times even when flash is not running.)
--
Rgds
Peter
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 10:10 ` Neil Bothwick
@ 2011-05-29 13:55 ` Dale
2011-05-29 21:08 ` Neil Bothwick
0 siblings, 1 reply; 16+ messages in thread
From: Dale @ 2011-05-29 13:55 UTC (permalink / raw
To: gentoo-user
Neil Bothwick wrote:
> On Sat, 28 May 2011 21:28:47 -0500, Dale wrote:
>
>
>> No mention of the @ sign there. It does say to read the info file but
>> I very rarely get into those. I never have had any good luck with
>> them. I felt like I was in Hotel California once before. O_O I
>> couldn't get out.
>>
> I thought you were a KDE user? Press Alt-F2, enter info:/date, enjoy :)
>
>
>
I am. I use Konsole. Very rarely use Alt F2 tho.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 13:55 ` Dale
@ 2011-05-29 21:08 ` Neil Bothwick
2011-05-29 21:42 ` Dale
0 siblings, 1 reply; 16+ messages in thread
From: Neil Bothwick @ 2011-05-29 21:08 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
On Sun, 29 May 2011 08:55:24 -0500, Dale wrote:
> > I thought you were a KDE user? Press Alt-F2, enter info:/date,
> > enjoy :)
> I am. I use Konsole. Very rarely use Alt F2 tho.
So you use the horrible text interface for info instead of seeing nice
HTML in Konqueror, never mind :)
--
Neil Bothwick
Deja Moo: The feeling that you heard this bull somewhere before.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 21:08 ` Neil Bothwick
@ 2011-05-29 21:42 ` Dale
0 siblings, 0 replies; 16+ messages in thread
From: Dale @ 2011-05-29 21:42 UTC (permalink / raw
To: gentoo-user
Neil Bothwick wrote:
> On Sun, 29 May 2011 08:55:24 -0500, Dale wrote:
>
>
>>> I thought you were a KDE user? Press Alt-F2, enter info:/date,
>>> enjoy :)
>>>
>
>> I am. I use Konsole. Very rarely use Alt F2 tho.
>>
> So you use the horrible text interface for info instead of seeing nice
> HTML in Konqueror, never mind :)
>
>
Well, once in a blue moon I do use Konqueror. I just use man:<command here> instead of info. Me and info just don't yee haw to well. LOL I'm going to give info a whirl again just for giggles. There is the kill command if it gets froggy. o_O
Dale
:-) :-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 2:28 ` Dale
2011-05-29 10:10 ` Neil Bothwick
@ 2011-05-29 22:18 ` Henry Gebhardt
2011-05-30 9:16 ` Florian Philipp
1 sibling, 1 reply; 16+ messages in thread
From: Henry Gebhardt @ 2011-05-29 22:18 UTC (permalink / raw
To: gentoo-user
On Sat, May 28, 2011 at 09:28:47PM -0500, Dale wrote:
>
> I went back to the man page, it sort of left the @ out on mine:
>
> -d, --date=STRING
> display time described by STRING, not `now'
>
> No mention of the @ sign there. It does say to read the info file but I
> very rarely get into those. I never have had any good luck with them.
May I suggest sending a patch upstream? That'd be pretty cool. Just fix
it in the right place where everyone will find it. I bet other people
would appreciate it, too.
Thanks,
H
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Converting time formats
2011-05-29 22:18 ` Henry Gebhardt
@ 2011-05-30 9:16 ` Florian Philipp
0 siblings, 0 replies; 16+ messages in thread
From: Florian Philipp @ 2011-05-30 9:16 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 908 bytes --]
Am 30.05.2011 00:18, schrieb Henry Gebhardt:
> On Sat, May 28, 2011 at 09:28:47PM -0500, Dale wrote:
>>
>> I went back to the man page, it sort of left the @ out on mine:
>>
>> -d, --date=STRING
>> display time described by STRING, not `now'
>>
>> No mention of the @ sign there. It does say to read the info file but I
>> very rarely get into those. I never have had any good luck with them.
>
> May I suggest sending a patch upstream? That'd be pretty cool. Just fix
> it in the right place where everyone will find it. I bet other people
> would appreciate it, too.
>
>
> Thanks,
>
> H
>
Just adding the @ will not be sufficient. The STRING can be in many
different formats. `date -d 'last tuesday'` also works, for example. You
have to add a whole new section to the man page -- or just refer to the
info page ;-)
Regards,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2011-05-30 9:18 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-28 16:37 [gentoo-user] Converting time formats Dale
2011-05-28 16:45 ` [gentoo-user] " Nikos Chantziaras
2011-05-28 16:50 ` [gentoo-user] " Alex Schuster
2011-05-28 17:31 ` Dale
2011-05-28 17:30 ` Florian Philipp
2011-05-29 0:48 ` William Kenworthy
2011-05-29 2:28 ` Dale
2011-05-29 10:10 ` Neil Bothwick
2011-05-29 13:55 ` Dale
2011-05-29 21:08 ` Neil Bothwick
2011-05-29 21:42 ` Dale
2011-05-29 22:18 ` Henry Gebhardt
2011-05-30 9:16 ` Florian Philipp
2011-05-29 10:08 ` Mick
2011-05-29 13:07 ` William Kenworthy
2011-05-29 13:47 ` Peter Humphrey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox