Public bug reported:

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_mon == currtm.tm_mon &&
                     exectm.tm_mday < currtm.tm_mday)))
                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.

** Affects: at (Ubuntu)
     Importance: Undecided
         Status: New

-- 
'at DAY_OF_WEEK' calculates wrong date when its next year.
https://bugs.launchpad.net/bugs/312051
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to