Package: coreutils
Version: 6.10-3
Severity: normal

[EMAIL PROTECTED]:~$ touch 20080412.gpx --date=2008-04-12T05:21:44Z
touch: invalid date format `2008-04-12T05:21:44Z'
[EMAIL PROTECTED]:~$ touch 20080412.gpx --date=2008-04-12T05:21:44 
[EMAIL PROTECTED]:~$ ls -l 20080412.gpx 
-rw-rw-r-- 1 andrew andrew 232974 2008-04-12 10:21 20080412.gpx

There are two problems here, one of which is covered by:
 http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=286201

The manpage for touch says:
       -d, --date=STRING
              parse STRING and use it instead of current time

Since there is no mention of what format the STRING must be it seems to
me very reasonable to assume that ISO date formats should be acceptable
to it, at a minimum.

The trailling Z on an ISO date indicates that the date has been
canonicalised to UTC, and the 'T', of course, separates the date and
time parts.

It seems to me that this clearly violates the 'principal of least surprise'.

Although I understand the importance of the need to remain backward-
compatible with older methods of parsing dates we must be reaching a
time where the likelihood of a string such as '2008-04-12T05:21:44'
*not* being an ISO format date approaches zero.

Regards,
                                Andrew McMillan.


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

Kernel: Linux 2.6.25-rc8-hippy (SMP w/2 CPU cores)
Locale: LANG=en_NZ.UTF8, LC_CTYPE=POSIX (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

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

coreutils recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to