bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date dosen't convert date from day-of-year


From: Eric Blake
Subject: Re: date dosen't convert date from day-of-year
Date: Tue, 27 Feb 2007 06:09:34 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Mgr. Peter Tuharsky on 2/27/2007 2:00 AM:
> Hi
> 
> I have used 'date' command in Debian Sarge to compute the actual date
> from the day-of-year value. I have sent the (wrong) date e.q. 2007-01-48
> and the date has given me back the correct feb 17 00:00:00 CET 2007

That was in older versions of coreutils.

> 
> Now the date complains for bad date and gives nothing back!

This is intentional.  There are too many places where the old behavior of
accepting invalid dates led to surprising behavior.

> 
> Please, could there be some option to compute the right date from
> day-of-year again? Or should I use some other command?

$ date -u -d '2007-01-01 +48 days'
Sun Feb 18 00:00:00 UTC 2007

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFF5C2N84KuGfSFAYARAhIpAJj0MExSj4f5dBV4nFNqwpKMLnQdAJ9CzZah
3uBdH4Te0e5xfIPvS34sdg==
=Wtxo
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]