[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in date (GNU sh-utils) 2.0
From: |
Zvi Har'El |
Subject: |
Bug in date (GNU sh-utils) 2.0 |
Date: |
Wed, 20 Jun 2001 13:23:47 +0300 (IDT) |
Hi,
I am afraid I stumbled on a bug in date (GNU sh-utils) 2.0, running on RedHat
7.1 (RPM sh-utils-2.0-13) or Solaris 2.6 (installed from sources in
sh-utils-2.0.tar.gz). When trying to convert seconds since the epoch to
readable date (following the examples in the info file) I got
$ TZ=Asia/Jerusalem date -u -d "1970-01-01 UTC `date +%s` sec";date -u
Wed Jun 20 11:04:14 UTC 2001
Wed Jun 20 10:04:15 UTC 2001
$ TZ=+0300 date -u -d "1970-01-01 UTC `date +%s` sec";date -u
Wed Jun 20 10:04:57 UTC 2001
Wed Jun 20 10:04:57 UTC 2001
The result shouldn't depend on the TZ at all. The second behavior is correct,
The first, incorrect behavior happens in variations for different cities,
i.e.,
$ TZ=America/Anchorage date -u -d "1970-01-01 UTC `date +%s` sec";date -u
Wed Jun 20 12:10:05 UTC 2001
Wed Jun 20 10:10:05 UTC 2001
The incorrect behavior doesn't happen with date (GNU sh-utils) 1.16, which I
have installed on a RedHat 5.2 machine (RPM sh-utils-1.16-14). I also was not
able to replicate it on a Solaris 2.8 machine on which I installed date (GNU
sh-utils) 2.0 from sources.
Sincerely,
Zvi.
--
Dr. Zvi Har'El mailto:address@hidden Department of Mathematics
tel:+972-54-227607 Technion - Israel Institute of Technology
fax:+972-4-8324654 http://www.math.technion.ac.il/~rl/ Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
Wednesday, 29 Sivan 5761, 20 June 2001, 1:00PM
- Bug in date (GNU sh-utils) 2.0,
Zvi Har'El <=