at command ignores savings time when given UTC time

Bug #433545 reported by Paolo Montrasio
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
at (Debian)
Fix Released
Unknown
at (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

at doesn't handle correctly UTC date. My timezone is CEST which is UTC+1 plus one more hour for daylight saving. That make is two hours more than UTC. This is what happens when I try to run an at task specifying the date as UTC.

$ date
Sun Sep 20 17:07:42 CEST 2009
$ date -u
Sun Sep 20 15:07:44 UTC 2009
$ at 1510 UTC 20 SEP 2009
at: refusing to create job destined in the past

Actually 15:10 UTC is more than two minutes in the future.

$ at 1610 UTC 20 SEP 2009

works. I downloaded the source package with apt-get source at and found the bug in the parsetime.y file.
I checked this both on a 8.10 and on a 9.04 machine and got the same results.

I discovered that a bug for this has already been opened to Debian in 2006 for this very same version of the at package (3.1.10) and a patch has been submitted by Håkon Stordahl (I think he's a maintainer). I tried it and it works for me so I attach it to this message. Refer to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364975 for the details.
Unfortunately it seems that the patch didn't make it yet in any released package because a debian 5 server of mine has the same package version and the same bug. It could be possible to apply it to the next Ubuntu release?

Distribution and package info:

For Ubuntu 8.10

$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

$ apt-cache policy at
at:
  Installed: 3.1.10.1ubuntu3
  Candidate: 3.1.10.1ubuntu3
  Version table:
 *** 3.1.10.1ubuntu3 0
        500 http://it.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

Despite package number 3.1.10 "at -V" reports "at version 3.1.9"

For Ubuntu 9.04

$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

$ apt-cache policy at
at:
  Installed: 3.1.10.2ubuntu2
  Candidate: 3.1.10.2ubuntu2
  Version table:
 *** 3.1.10.2ubuntu2 0
        500 http://it.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

"at -V" also reports "at version 3.1.9" here.

Revision history for this message
Paolo Montrasio (paolo-paolomontrasio) wrote :
Changed in at (Debian):
status: Unknown → New
Changed in at (Ubuntu):
status: New → Confirmed
Changed in at (Debian):
status: New → Confirmed
MarcRandolph (mrand)
Changed in at (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Paolo Montrasio (paolo-paolomontrasio) wrote :

at still has the bug in Karmic.

$ date -u
Sat Mar 13 14:10:36 UTC 2010
$ at 1415 UTC 13 MAR 2010
at: refusing to create job destined in the past
$ apt-cache policy at
at:
  Installed: 3.1.11-1ubuntu4
  Candidate: 3.1.11-1ubuntu4
  Version table:
 *** 3.1.11-1ubuntu4 0
        500 http://mirror.switch.ch karmic/main Packages
        100 /var/lib/dpkg/status

I'll reapply the patch from Debian.

tags: added: patch-forwarded-debian
Revision history for this message
Philippe Clérié (pclerie) wrote :

Just filed 889665 describing the same bug on natty.

Revision history for this message
Paolo Montrasio (paolo-paolomontrasio) wrote :

Still there in 12.04

Revision history for this message
Jon Gabrielson (a-jon-g) wrote :

This bug is alot more serious (once a year) that you might guess as it also affects daylight savings time.
All "at now" and "at now + 1 minute", etc... commands stopped working for 1 hour last night:

root@pbx:~ $ date
Sun Nov 2 01:34:09 CST 2014
root@pbx:~ $ echo "ls" |at now
at: refusing to create job destined in the past
root@pbx:~ $ echo "ls" |at now + 1 minute
at: refusing to create job destined in the past
root@pbx:~ $ echo "ls" |at now + 10 minute
at: refusing to create job destined in the past
root@pbx:~ $ echo "ls" |at now + 30 minute
job 413 at 2014-11-02 02:04
root@pbx:~ $ date
Sun Nov 2 01:34:30 CST 2014
root@pbx:~ $

Revision history for this message
linuxwrangler (scrawford-pinpointresearch) wrote :

Yes. I reported that bug three and a half years ago:
https://bugs.launchpad.net/ubuntu/+source/at/+bug/727514

That issue was determined to have the same cause as this one so it was marked as a duplicate. For whatever reason, reliable job scheduling is not an assigned priority for the distribution maintainers as this report started a half-decade ago.

Changed in at (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.