delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/08/07/08:36:26

X-Authentication-Warning: kendall.sfbr.org: jeffw set sender to jeffw AT darwin DOT sfbr DOT org using -f
Date: Wed, 7 Aug 2002 07:36:16 -0500
From: JT Williams <jeffw AT darwin DOT sfbr DOT org>
To: djgpp AT delorie DOT com
Cc: Prashant TR <tr AT midpec DOT com>
Subject: problem with 'date' (sh-utils 2.0.11)
Message-ID: <20020807123616.GA1905@kendall.sfbr.org>
Mail-Followup-To: djgpp AT delorie DOT com, Prashant TR <tr AT midpec DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.4i
Reply-To: djgpp AT delorie DOT com

The 'date' utility from the djgpp port of sh-utils 2.0.11
(dated 2002 Apr 18) has problems with some dates, e.g.:

% date --version
date (GNU sh-utils) 2.0.11
Written by David MacKenzie.

Copyright (C) 2000 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% date -d "1960 Jan 1" --utc "+%s"
c:/djgpp/bin/date.exe: invalid date `1960 Jan 1'


I cannot find a 2.0.11 release of sh-utils at gnu.org or alpha.gnu.org,
but here is how sh-utils 2.0 behaves on Solaris:

% date --version
date (GNU sh-utils) 2.0
Written by David MacKenzie.

Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% date -d "1960 Jan 1" --utc "+%s"
1147582800

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019