bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20199: Enhancement request for date's "-d" option: different epochs


From: Ulrich Windl
Subject: bug#20199: Enhancement request for date's "-d" option: different epochs
Date: Wed, 25 Mar 2015 13:26:25 +0100

Hi!

I'm not subscribed to this list, and I hope this is the right place to report 
an enhancement request as there seems to be no bugzilla for that.
Anyway: When downloading the current leap seconds list for out NTP server I 
realized that the dates there seem to be specified in seconds from 
1900-01-01_00:00:00 on one hand, and on the other I realized that date's option 
"-d" only allows UNIX epochs using the "@" notation.

Therefore I suggest to allow different starting epochs, possible using a syntax 
like "date -d '1900-01-01+2287785599'" to print the date and time of 2287785599 
seconds past January 1st 1900. ("Like" means I suggest the semantics, but are 
not really proposing a concrete syntax; possibly there are smarter guy around 
than me)

Also being able to decode hexadecimal NTP timestamps would be a nice feature: 
NTp timestamps look like this:
d8bd24ef.a8e2bb68 meaning "Wed, Mar 25 2015 13:13:35.659...", so it's 32 bit 
for the seconds and another 32 bit for the fractional seconds (see page 9 of 
the PostScript or PDF version of RFC 1305: "NTP timestamps are represented as a 
64-bit
unsigned fixed-point number, in seconds relative to 0h on 1 January 1900. The 
integer part is in the
first 32 bits and the fraction part in the last 32 bits.")

Maybe a "tagged" syntax like "-d NTP:d8bd24ef.a8e2bb6" could be used...

(For consistency other tags like "UNIX:" for the UNIX epoch and "MS-WIN:" for 
Microsoft Windows could be used. Again smart guys probably know more important 
epochs than I do)

Regards,
Ulrich








reply via email to

[Prev in Thread] Current Thread [Next in Thread]