Package: coreutils
Version: 8.21-1
Severity: minor
File: /bin/date

These work as expected:

$ date -d '1 hour'
Die Nov 19 11:21:35 CET 2013
$ date -d '0 hour'
Die Nov 19 10:21:37 CET 2013
$ date -d '1 hour ago'
Die Nov 19 09:21:40 CET 2013


This gives a wrong answer, and no parsing error:
$ date -d 'a hour ago'
Die Nov 19 11:21:44 CET 2013

It looks like single characters are parsed as hour offsets:
$ date -d 'a'
Die Nov 19 02:00:00 CET 2013
$ date -d 'b'
Die Nov 19 03:00:00 CET 2013
$ date -d 'c'
$ date -d 'h'
Die Nov 19 09:00:00 CET 2013
$ date -d 'o'
Mon Nov 18 23:00:00 CET 2013
$ date -d 'p'
Mon Nov 18 22:00:00 CET 2013

I couldn't find anything about that in the info documentation.


This would be a bit more correct, but gives an error:
$ date -d 'an hour ago'
date: invalid date 'an hour ago'


$ echo $TZ
Europe/Vienna
$ locale
LANG=de_AT.UTF-8
LANGUAGE=de_AT:de
LC_CTYPE="de_AT.UTF-8"
LC_NUMERIC="de_AT.UTF-8"
LC_TIME="de_AT.UTF-8"
LC_COLLATE="de_AT.UTF-8"
LC_MONETARY="de_AT.UTF-8"
LC_MESSAGES="de_AT.UTF-8"
LC_PAPER="de_AT.UTF-8"
LC_NAME="de_AT.UTF-8"
LC_ADDRESS="de_AT.UTF-8"
LC_TELEPHONE="de_AT.UTF-8"
LC_MEASUREMENT="de_AT.UTF-8"
LC_IDENTIFICATION="de_AT.UTF-8"
LC_ALL=



-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages coreutils depends on:
ii  libacl1      2.2.52-1
ii  libattr1     1:2.4.47-1
ii  libc6        2.17-93
ii  libselinux1  2.1.13-3

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to