Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Feb 2019 16:03:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 235781] [patch] at(1) HH:MM fails to assume next day
Message-ID:  <bug-235781-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235781

            Bug ID: 235781
           Summary: [patch] at(1) HH:MM fails to assume next day
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: naddy@FreeBSD.org

Created attachment 202068
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D202068&action=
=3Dedit
Fix at(1) failure to assume next day

The at(1) man page says:

     The at utility allows some moderately complex time specifications.  It
     accepts times of the form HHMM or HH:MM to run a job at a specific time
     of day.  (If that time is already past, the next day is assumed.)

Due to an ancient bug, this only works if the hour is past.  It fails if we=
 are
still within the same hour but the minutes are past:

  $ date
  Sat Feb 16 16:56:28 CET 2019
  $ echo dummy | at 15:00
  Job 42 will be executed using /bin/sh
  $ echo dummy | at 16:00
  at: trying to travel back in time

Simple fix attached.  This is applicable to all versions of FreeBSD.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235781-227>