'at DAY_OF_WEEK' calculates wrong date when its next year.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
at (Debian) |
Fix Released
|
Unknown
|
|||
at (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Binary package hint: at
The parsetime() function gets the wrong date, incorrectly adding a year, when day of week is specified, and
job is to be exectuted in the new year.
Affects 8.04 and 8.10 . Older 5.10 is OK.
e.g.
$ at 9am mon
warning: commands will be executed using /bin/sh
at> foo
at> <EOT>
job 12 at Tue Jan 5 08:00:00 2010
I found the bug in at-3.1.10ubuntu4 parsetime.y line 496:
else if (!yearspec) {
if ((exectm.tm_mon < currtm.tm_mon) ||
exectm.tm_year++;
}
To handle the case of "at DAY" where DAY is a day of the week that is next year, that first line could be:
else if (!yearspec && exectm.tm_year == currtm.tm_year ) {
Does that look OK? I know nothing of lex and yacc (flex/bison) .
I suppose this is an upstream problem for debian and GNU?
How do I track it upstream? There doesn't seem to be an 'at' package on the GNU mirrors.
Related branches
Changed in at: | |
status: | Unknown → Fix Committed |
Changed in at (Debian): | |
status: | Fix Committed → New |
Changed in at (Debian): | |
status: | New → Fix Committed |
Changed in at (Ubuntu): | |
status: | New → Fix Committed |
assignee: | nobody → Ansgar Burchardt (ansgar-43-1) |
Changed in at (Debian): | |
status: | Fix Committed → Fix Released |
I belatedly found the bug already reported upstream in Debian. Its a couple of years old :-(
Since they are so slow to fix it, can a patch be applied in Ubuntu?
http:// bugs.debian. org/cgi- bin/bugreport. cgi?bug= 404965
Does this come from the FSF/GNU or is it a version written for debian?