bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-24 Thread Voelker, Bernhard
On 08/23/2010 18:02, Payk Eggert wrote: ... For example: $ TZ=Pacific/Kwajalein date -d 1993-08-20 date: invalid date `1993-08-20' There was no time during the day 1993-08-20, because at midnight Kwajalein moved the clocks ahead by 24 hours. BTW: This example looks different here: $

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-24 Thread Paul Eggert
On 08/24/10 00:23, Voelker, Bernhard wrote: BTW: This example looks different here: $ TZ=Pacific/Kwajalein date -d 1993-08-20 Sat Aug 21 00:00:00 MHT 1993 $ date --version date (GNU coreutils) 8.5 Packaged by Cygwin (8.5-2) ... Why? Haven't a clue. Perhaps you can

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-24 Thread Voelker, Bernhard
On 08/24/10 10:04, Eggert, Paul wrote: On 08/24/10 00:23, Voelker, Bernhard wrote: BTW: This example looks different here: $ TZ=Pacific/Kwajalein date -d 1993-08-20 Sat Aug 21 00:00:00 MHT 1993 $ date --version date (GNU coreutils) 8.5 Packaged by Cygwin (8.5-2) ...

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-24 Thread Eric Blake
On 08/24/2010 01:23 AM, Voelker, Bernhard wrote: $ TZ=Pacific/Kwajalein date -d 1993-08-20 Sat Aug 21 00:00:00 MHT 1993 $ date --version date (GNU coreutils) 8.5 Packaged by Cygwin (8.5-2) Why? Most likely, because cygwin is using a slightly different tzdata package than

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-24 Thread Voelker, Bernhard
On 08/24/2010 15:09, Eric Blake wrote: On 08/24/2010 01:23 AM, Voelker, Bernhard wrote: $ TZ=Pacific/Kwajalein date -d 1993-08-20 Sat Aug 21 00:00:00 MHT 1993 $ date --version date (GNU coreutils) 8.5 Packaged by Cygwin (8.5-2) Why? Most likely, because cygwin is using a

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-24 Thread Bob Proulx
Paul Eggert wrote: Voelker, Bernhard wrote: With a normal user's perspective, I'd expect `date` to just do the job Gee, I don't know, all the normal users I know just want date to print the date. Date arithmetic is pretty esoteric, after all. What is one month after 31 January, for

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-23 Thread Bob Proulx
Bob Proulx wrote: 李嘉鹏 wrote: I used some script(At the end of the letter) to get a series of date. but the script always fails at the date 1991-04-14. so I tested the single command date -d '1991-04-14 +1 day' It would also fail with a error message date: invalid date

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-23 Thread Paul Eggert
On 08/22/10 18:09, Alan Curry wrote: There might be less occurrences of this misunderstanding if we could teach date that -d 4/14/1991 is not actually a request for 4/14/1991 00:00:00, but any time that existed during the day 4/14/1991, or perhaps a more specific the first second of 4/14/1991.

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-23 Thread Alan Curry
Paul Eggert writes: On 08/22/10 18:09, Alan Curry wrote: There might be less occurrences of this misunderstanding if we could teach date that -d 4/14/1991 is not actually a request for 4/14/1991 00:00:00, but any time that existed during the day 4/14/1991, or perhaps a more specific the

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-23 Thread Paul Eggert
On 08/23/2010 02:59 PM, Alan Curry wrote: date: invalid date `4/14/1991' which is a lie. 4/14/1991 is not an invalid date. It is an invalid date, under the assumption that dates without times refer to the time 00:00:00 on that date. This assumption has been in the software for ages, and

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-22 Thread 李嘉鹏
Hi, I used some script(At the end of the letter) to get a series of date. but the script always fails at the date 1991-04-14. so I tested the single command date -d '1991-04-14 +1 day' It would also fail with a error message date: invalid date `1991-04-14 +1 day' displayed. Here's some

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-22 Thread Bob Proulx
李嘉鹏 wrote: I used some script(At the end of the letter) to get a series of date. but the script always fails at the date 1991-04-14. so I tested the single command date -d '1991-04-14 +1 day' It would also fail with a error message date: invalid date `1991-04-14 +1 day' displayed.

bug#6897: date -d '1991-04-14 +1 day' fails

2010-08-22 Thread Alan Curry
Bob Proulx writes: date -d '1991-04-14 12:00 +1 day' I'm from china by the way, and the time zone I am in and to which the systems were set is GMT8(or CST, China Standard Time). Indeed, TZ=Asia/Shanghai date -d '4/14/1991' date: invalid date `4/14/1991' TZ=Asia/Shanghai date -d