On Mon, Jan 29, 2001 at 10:22:27AM +0100, Walther, Christoph wrote:
> ich habe einen Zahlenwert, welcher die verstrichenen Sekunden seit
> Geburtstunde von UNIX
> (01.01.1970) repräsentiert.
> Diesen Zahlenwert würde ich gerne in das/die zutreffende Datum/Uhrzeit
> umrechnen.
> Weiß jemand von Euch, ob es dafür unter Debian Linux
> ein entsprechendes Tool/Packet gibt, welches eine solche Umrechnung
> ermöglicht ??
man date -> info date und dort findet man:
* If you're sorting or graphing dated data, your raw date values may
be represented as seconds since the epoch. But few people can
look at the date `946684800' and casually note "Oh, that's the
first second of the year 2000."
date --date='2000-01-01 UTC' +%s
946684800
To convert such an unwieldy number of seconds back to a more
readable form, use a command like this:
date -d '1970-01-01 946684800 sec' +"%Y-%m-%d %T %z"
2000-01-01 00:00:00 +0000
rtfm?!
ok?
Gruss
Grisu
--
Michael Bramer - a Debian Linux Developer http://www.debian.org
PGP: finger grisu@db.debian.org -- Linux Sysadmin -- Use Debian Linux
"If privacy ist outlawed, only outlaws will have privacy."
-- Philip Zimmerman, author of PGP
Attachment:
pgpDfPIzzxoT3.pgp
Description: PGP signature