Comment 15 for bug 51106

Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote :

Another obscure observation I made on Ubuntu 12.04 (probably affects all previous versions as well):

glaubitz@ubuntu:~$ date -d "11:40 + 1 minutes"
Mon Jun 11 12:41:00 CEST 2012
glaubitz@ubuntu:~$ date -d "11:40 + 2 minutes"
Mon Jun 11 11:41:00 CEST 2012
glaubitz@ubuntu:~$ date -d "11:40 + 3 minutes"
Mon Jun 11 10:41:00 CEST 2012
glaubitz@ubuntu:~$ date -d "11:40 + 4 minutes"
Mon Jun 11 09:41:00 CEST 2012
glaubitz@ubuntu:~$ date -d "11:40 + 5 minutes"
Mon Jun 11 08:41:00 CEST 2012

On a side note, date seems to have trouble on systems where time_t is too small (i.e. 32 bits instead of 64 bits):

glaubitz@debian32:~> lsb_release -rsc
6.0.5
squeeze
glaubitz@debian32:~> uname -a
Linux debian32 3.2.0-0.bpo.2-686-pae #1 SMP Wed May 30 01:20:28 UTC 2012 i686 GNU/Linux
glaubitz@debian32:~> date -d "1000 months ago"
date: invalid date `1000 months ago'
glaubitz@debian32:~> date -d "2000 months ago"
Tue Nov 17 06:29:07 CET 1981
glaubitz@debian32:~> logout
Connection to debian32 closed.
glaubitz@debian64:~> lsb_release -rsc
6.0.5
squeeze
glaubitz@debian64:~> uname -a
Linux debian64 3.2.0-0.bpo.1-amd64 #1 SMP Wed Jan 25 00:15:47 UTC 2012 x86_64 GNU/Linux
glaubitz@debian64:~> date -d "1000 months ago"
Mon Feb 11 01:01:14 CET 1929
glaubitz@debian64:~> date -d "2000 months ago"
Sat Oct 11 01:01:17 LMT 1845

This was tested on Debian Squeeze, but affects Ubuntu as well (tested on Precise, 12.04). I guess this should be reported to upstream and go into a separate bug report.

Adrian