bug-coreutils
[Top][All Lists]
Advanced

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

date issues with YYYYMMDD/YYMMDD date format and relative offset


From: Ondřej Vašík
Subject: date issues with YYYYMMDD/YYMMDD date format and relative offset
Date: Fri, 16 Nov 2007 18:34:23 +0100

Hello,
date command has some troubles with YYYYMMDD date format.
When you try 'date -d "20050101 +1 day"' (or whatever 
relative offset), you will get invalid date because 
of conflicts in translation tables. Nearly same command
date -d "20050101 UTC +1 day" is working correctly with
current version of coreutils.

Solution is easy - to add hybrid date/time/relative option 
to getdate.y as I did in attached patch. Should be 
harmless for the rest of date formats. I know that
this YYYYMMDD format is not recommended in any man/info 
pages, but is still considered valid, so should be 
handled correctly. Same is corrected for time 
hhmm/hh format.
(for details you can check redhat bugzilla #377781)


Greetings,
         Ondrej Vasik 

Attachment: coreutils-getdateYYYYMMDD.patch
Description: Text Data

Attachment: signature.asc
Description: Toto je digitálně podepsaná část zprávy


reply via email to

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