GNU bug report logs -
#45695
Date does not work for dates before 1970
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45695 in the body.
You can then email your comments to 45695 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#45695
; Package
coreutils
.
(Wed, 06 Jan 2021 16:36:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
zed991 <jt40407 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Wed, 06 Jan 2021 16:36:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (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 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#45695
; Package
coreutils
.
(Wed, 06 Jan 2021 22:54:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 45695 <at> debbugs.gnu.org (full text, mbox):
On Wed, 6 Jan 2021, at 16:34, zed991 wrote:
> 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
That specific page refers to coreutils 5.3.0, which was published in 2005. The gnuwin32 website in general doesn't appear to have been updated in over 10 years.
My personal recommendation to run coreutils on Windows is WSL2, but there are other options (cygwin etc.)
Cheers,
Phil
Reply sent
to
Bob Proulx <bob <at> proulx.com>
:
You have taken responsibility.
(Wed, 13 Jan 2021 00:00:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
zed991 <jt40407 <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 13 Jan 2021 00:00:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 45695-done <at> debbugs.gnu.org (full text, mbox):
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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 10 Feb 2021 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 73 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.