On Thu, Apr 21, 2005 at 11:19:11PM +0200, Mike Dornberger wrote: > Hi, Hi -
> On Thu, Apr 21, 2005 at 02:08:46PM -0400, Benjamin A. Okopnik wrote: > > [EMAIL PROTECTED]:~# hwclock --set --date="04-21-2005 13:58:00" > > [EMAIL PROTECTED]:~# hwclock > > Sat Feb 26 13:58:05 2011 -0.675597 seconds > > > When '-' is used as the date delimiter, 'hwclock' sets some weird future > > day, month, and year - without any warning. It should either a) use the > > option correctly, or b) fail with an error message. > > man hwclock refers to date(1), which prints the same date/time given > --date"04-...". I think the expected form with dashes is [yy]yy-mm-dd (IIRC > it's some ISO norm). Ah - I see what you mean. It seems like both 'hwclock' and 'date' should require a '--iso' option (or something like that) to use that format; having it produce a result that's wildly different from the obviously expected one - and several people to whom I've spoken about it have _all_ run into a problem with this - seems really wrong. > Though "info date" states, that month should be 1-12 and day 1-31, it's no > error giving bigger values. Maybe it is some glibc feature. Heh. That's the alternate spelling of 'bug', I believe? > It seems, there > are 21 month added to 2004-01-01 and then 2005 days, but I can't reproduce > the exact date (Feb 26 2011) myself (i.e. no "date") yet. ------------------------------------------------ [EMAIL PROTECTED]:~$ date --date="04-21-2005 13:58:00" Sat Feb 26 13:58:00 EST 2011 [EMAIL PROTECTED]:~$ date --version date (coreutils) 5.2.1 Written by David MacKenzie. ------------------------------------------------ Yep, seems to be repeatable. I guess it's a bug against 'glibc' - although both 'hwclock' and date _should_ have an option to differentiate between these two (very subtle but with a large difference in the result) options. Sincere regards, * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://linuxgazette.net * -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]