bug-coreutils
[Top][All Lists]
Advanced

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

date returns wrong year in the first calendar week if used with "1 weeks


From: Robert Marz
Subject: date returns wrong year in the first calendar week if used with "1 weeks ago"
Date: Sun, 9 Jan 2005 00:13:21 +0100

Hi,
 
i found a bug in the date command.
date returns wrong year in the first calendar week if used with "1 weeks
ago"
 
unfortunatly this only reproduces, if the system date is set to somewhere in
the first week of the year.
The bug reproduces on cygwin and redhat linux 9 (all I got to test).
 
See session transcript below...
 
Can you inform me of the status of this bug?
 
Regards 
 
Robert
 
Session transcript:
 
address@hidden date-bug]$ date
Sun Jan  9 00:04:04 CET 2005
address@hidden date-bug]$ date +%Y-KW%V
# What date is now?
2005-KW01
address@hidden date-bug]$ date +%Y-KW%V -d "Tue Jan  4 23:56:12 CET 2005 1
weeks ago" # This is right
2004-KW53
address@hidden date-bug]$ date +%Y-KW%V -d " 1 weeks ago"
# OUCH, wrong year!
2005-KW53
address@hidden date-bug]$ date +%Y-KW%V -d " 2 weeks ago"
# and we are in sync again...
2004-KW52



reply via email to

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