GNU bug report logs - #45695
Date does not work for dates before 1970

Previous Next

Package: coreutils;

Reported by: zed991 <jt40407 <at> gmail.com>

Date: Wed, 6 Jan 2021 16:36:03 UTC

Severity: normal

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: zed991 <jt40407 <at> gmail.com>
Subject: bug#45695: closed (Re: bug#45695: Date does not work for dates
 before 1970)
Date: Wed, 13 Jan 2021 00:00:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#45695: Date does not work for dates before 1970

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 45695 <at> debbugs.gnu.org.

-- 
45695: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45695
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Bob Proulx <bob <at> proulx.com>
To: zed991 <jt40407 <at> gmail.com>
Cc: 45695-done <at> debbugs.gnu.org
Subject: Re: bug#45695: Date does not work for dates before 1970
Date: Tue, 12 Jan 2021 16:59:47 -0700
zed991 wrote:
> On linux, I can use  date +%s --date "31 Dec 1969"
> The result is -90000
> A negative number

Which is correct for dates before the 0 time:

    Thu, 01 Jan 1970 00:00:00 +0000

    https://en.wikipedia.org/wiki/Unix_time

> But when I try it on Windows (using GNUWin32) it gives me an error -
> "invalid date"
> 
> I downloaded date for windows from this link -
> http://gnuwin32.sourceforge.net/packages/coreutils.htm
> 
> Is there any fix for Windows?

According to that page the last update of the GnuWin project was
2015-05-20 therefore one might think that project is no longer
updating now more than five years later.

Perhaps it would be good to look for a different MS-Windows port of
the software?  The usual recommendation is to install Cygwin which
generally is a more reliable port of the software.  Although I
understand that it might be a little heavy for many users.  But
whichever port to Microsoft you find look to see that it has been
updated in the last few years.

Generally the GNU Project is all about the source and use on Free(dom)
Software systems.  Generally most of us are not using Microsoft and
therefore it makes it hard for us to help.  It really needs a
Microsoft person to champion the cause and to keep that system updated.

Since this is not a bug in the GNU Coreutils software itself but in
the windows port of it I am going to go ahead and close the ticket
with this message.  But if you have updates about this please send an
update to the bug ticket as it would help us know what to say in the
future to other Microsoft users.  And other people searching the
archive will benefit from your experience with it.

Bob

[Message part 3 (message/rfc822, inline)]
From: zed991 <jt40407 <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Date does not work for dates before 1970
Date: Wed, 6 Jan 2021 17:34:01 +0100
[Message part 4 (text/plain, inline)]
On linux, I can use  date +%s --date "31 Dec 1969"
The result is -90000
A negative number

But when I try it on Windows (using GNUWin32) it gives me an error -
"invalid date"

I downloaded date for windows from this link -
http://gnuwin32.sourceforge.net/packages/coreutils.htm

Is there any fix for Windows?
[Message part 5 (text/html, inline)]

This bug report was last modified 4 years and 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.