Received: (at 20199) by debbugs.gnu.org; 25 Mar 2015 13:17:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 25 09:17:07 2015
Received: from localhost ([127.0.0.1]:36054 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.80)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1YalBC-0006Ta-IO
for submit <at> debbugs.gnu.org; Wed, 25 Mar 2015 09:17:06 -0400
Received: from mail1.vodafone.ie ([213.233.128.43]:31461)
by debbugs.gnu.org with esmtp (Exim 4.80)
(envelope-from <P@HIDDEN>) id 1YalB9-0006T1-S9
for 20199 <at> debbugs.gnu.org; Wed, 25 Mar 2015 09:17:04 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4LAOG0ElVtT91e/2dsb2JhbABcgwaDcMVwglICgVFMAQEBAQEBfUEBg1MBBTIBVgsNCwkWDwkDAgECATcBDQYBDAgBARqIFQG0UJQ3AQoBAQEeiyGEfYQtAQSFC5xNjRMig24+gnQBAQE
Received: from unknown (HELO localhost.localdomain) ([109.79.221.94])
by mail1.vodafone.ie with ESMTP; 25 Mar 2015 13:16:58 +0000
Message-ID: <5512B549.6000500@HIDDEN>
Date: Wed, 25 Mar 2015 13:16:57 +0000
From: =?windows-1252?Q?P=E1draig_Brady?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: Ulrich Windl <Ulrich.Windl@HIDDEN>,
20199 <at> debbugs.gnu.org
Subject: Re: bug#20199: Enhancement request for date's "-d" option: different
epochs
References: <5512B781020000A100019960@HIDDEN>
<5512B3AC.7030509@HIDDEN>
In-Reply-To: <5512B3AC.7030509@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 20199
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)
On 25/03/15 13:10, Pádraig Brady wrote:
> On 25/03/15 12:26, Ulrich Windl wrote:
>> 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)
>
> Note offsets can be negative, so you could set the offset like:
>
> $ sec=1234567890
> $ date -d @$(($sec + $(date -d 1/1/1900 +%s)))
> Tue Feb 14 23:56:51 GMT 1939
Actually we can use date's relative date support for this:
$ date -d '1900-01-01 +1234567890 seconds'
Tue Feb 14 23:56:51 GMT 1939
cheers,
Pádraig.
bug-coreutils@HIDDEN:bug#20199; Package coreutils.
Full text available.
Received: (at 20199) by debbugs.gnu.org; 25 Mar 2015 13:10:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 25 09:10:15 2015
Received: from localhost ([127.0.0.1]:36049 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.80)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1Yal4Y-0006If-HP
for submit <at> debbugs.gnu.org; Wed, 25 Mar 2015 09:10:14 -0400
Received: from mail1.vodafone.ie ([213.233.128.43]:63397)
by debbugs.gnu.org with esmtp (Exim 4.80)
(envelope-from <P@HIDDEN>) id 1Yal4V-0006IQ-Na
for 20199 <at> debbugs.gnu.org; Wed, 25 Mar 2015 09:10:12 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4LAIyyElVtT91e/2dsb2JhbABcgwaDcMVwglICgVFMAQEBAQEBfUEBg1MBBTIBVgsNCwkWDwkDAgECATcBDQYBDAgBARqIFQG0UpQ2AQoBAQEeiyGEfYQtAQSFC5xNjRMig24+gnQBAQE
Received: from unknown (HELO localhost.localdomain) ([109.79.221.94])
by mail1.vodafone.ie with ESMTP; 25 Mar 2015 13:10:05 +0000
Message-ID: <5512B3AC.7030509@HIDDEN>
Date: Wed, 25 Mar 2015 13:10:04 +0000
From: =?windows-1252?Q?P=E1draig_Brady?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: Ulrich Windl <Ulrich.Windl@HIDDEN>,
20199 <at> debbugs.gnu.org
Subject: Re: bug#20199: Enhancement request for date's "-d" option: different
epochs
References: <5512B781020000A100019960@HIDDEN>
In-Reply-To: <5512B781020000A100019960@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 20199
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)
On 25/03/15 12:26, Ulrich Windl wrote:
> 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)
Note offsets can be negative, so you could set the offset like:
$ sec=1234567890
$ date -d @$(($sec + $(date -d 1/1/1900 +%s)))
Tue Feb 14 23:56:51 GMT 1939
cheers,
Pádraig.
bug-coreutils@HIDDEN:bug#20199; Package coreutils.
Full text available.
Received: (at submit) by debbugs.gnu.org; 25 Mar 2015 12:26:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 25 08:26:45 2015
Received: from localhost ([127.0.0.1]:36025 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.80)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1YakOS-00055g-Ce
for submit <at> debbugs.gnu.org; Wed, 25 Mar 2015 08:26:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47493)
by debbugs.gnu.org with esmtp (Exim 4.80)
(envelope-from <Ulrich.Windl@HIDDEN>)
id 1YakOQ-00055R-5m
for submit <at> debbugs.gnu.org; Wed, 25 Mar 2015 08:26:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from <Ulrich.Windl@HIDDEN>)
id 1YakOK-00051n-07
for submit <at> debbugs.gnu.org; Wed, 25 Mar 2015 08:26:36 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level:
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:48053)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from <Ulrich.Windl@HIDDEN>)
id 1YakOJ-00051j-Ta
for submit <at> debbugs.gnu.org; Wed, 25 Mar 2015 08:26:35 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49207)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from <Ulrich.Windl@HIDDEN>)
id 1YakOI-0006HR-NO
for bug-coreutils@HIDDEN; Wed, 25 Mar 2015 08:26:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from <Ulrich.Windl@HIDDEN>)
id 1YakOD-0004zm-KF
for bug-coreutils@HIDDEN; Wed, 25 Mar 2015 08:26:34 -0400
Received: from rrzmta2.uni-regensburg.de ([194.94.155.52]:40224)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from <Ulrich.Windl@HIDDEN>)
id 1YakOD-0004yu-E8
for bug-coreutils@HIDDEN; Wed, 25 Mar 2015 08:26:29 -0400
Received: from rrzmta2.uni-regensburg.de (localhost [127.0.0.1])
by localhost (Postfix) with SMTP id AA52660587
for <bug-coreutils@HIDDEN>; Wed, 25 Mar 2015 13:26:27 +0100 (CET)
Received: from gwsmtp1.uni-regensburg.de (gwsmtp1.uni-regensburg.de
[132.199.5.51])
by rrzmta2.uni-regensburg.de (Postfix) with ESMTP id 3A1EA60436
for <bug-coreutils@HIDDEN>; Wed, 25 Mar 2015 13:26:27 +0100 (CET)
Received: from uni-regensburg-smtp1-MTA by gwsmtp1.uni-regensburg.de
with Novell_GroupWise; Wed, 25 Mar 2015 13:26:27 +0100
Message-Id: <5512B781020000A100019960@HIDDEN>
X-Mailer: Novell GroupWise Internet Agent 14.0.1
Date: Wed, 25 Mar 2015 13:26:25 +0100
From: "Ulrich Windl" <Ulrich.Windl@HIDDEN>
To: <bug-coreutils@HIDDEN>
Subject: Enhancement request for date's "-d" option: different epochs
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
(bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)
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
"Ulrich Windl" <Ulrich.Windl@HIDDEN>:bug-coreutils@HIDDEN.
Full text available.bug-coreutils@HIDDEN:bug#20199; Package coreutils.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.