Your message dated Sun, 20 Apr 2008 10:03:57 -0400
with message-id <[EMAIL PROTECTED]>
and subject line Re: Bug#476974: coreutils: date -d '18:00 -1 hour' wrong answer
has caused the Debian Bug report #476974,
regarding coreutils: date -d '18:00 -1 hour' wrong answer
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
476974: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476974
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: coreutils
Version: 6.10-6
Severity: normal


These results are correct:

  griffon:~$ date
  Sun Apr 20 09:44:18 EDT 2008
  griffon:~$ date -d 'Sun Apr 20 18:00:00 EDT 2008 -1 hour'
  Sun Apr 20 17:00:00 EDT 2008
  griffon:~$ date -d '18:00:00 EDT -1 hour'
  Sun Apr 20 17:00:00 EDT 2008

But if I leave off the time zone name, I get:

  griffon:~$ date -d '18:00:00 -1 hour'
  Sun Apr 20 15:01:00 EDT 2008
  griffon:~$ date -d '18:00:00 -4 hour'
  Sun Apr 20 15:04:00 EDT 2008
  griffon:~$ date -d '18:00:00 -5 hour'
  Sun Apr 20 15:05:00 EDT 2008

This is clearly not correct or useful behavior.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.ISO8859-1, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages coreutils depends on:
ii  libacl1                       2.2.39-1   Access control list shared library
ii  libc6                         2.7-10     GNU C Library: Shared libraries
ii  libselinux1                   2.0.59-1   SELinux shared libraries

coreutils recommends no packages.

-- debconf-show failed



--- End Message ---
--- Begin Message --- The natural language date parsing code is a big hairy mess, and wasn't a good idea in the first place. If someone wants to submit a patch I'm sure it will be considered. But I'm not going to try to fix it myself, and I'm not going to leave bugs open on it. Try this syntax instead:
date -d '18:00:00 5 hours ago'
Sun Apr 20 13:00:00 EDT 2008

In general, you need to just try different things until you get the result you're expecting, you can't expect it to do something you think is logical. My preference would be to rip it out and replace it with a structured/constrained syntax, but then debian would be incompatible with everything else (including prior versions) so that's not particularly great either.

Mike Stone


--- End Message ---

Reply via email to