Bug 426 - at-3.17: 12am bug
at-3.17: 12am bug
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: at (Show other bugs)
5.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1998-12-15 02:10 EST by dkindred=redhat
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-03-18 15:59:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description dkindred=redhat 1998-12-15 02:10:59 EST
Version 3.17 of 'at' doesn't handle 12:00am-12:59am time
specifications correctly:

   % at -f /tmp/blah 12:30am; atq; atrm 6;
   warning: commands will be executed using /bin/sh
   job 6 at 1998-12-15 12:30
   6       1998-12-15 12:30 a

(Notice that the job is scheduled for 12:30pm.)
The patch below fixes this.

--- parsetime.y.orig    Tue May 13 08:46:16 1997
+++ parsetime.y Tue Dec 15 01:53:11 1998
@@ -181,6 +181,15 @@
                ;

 am_pm          : AM
+                   {
+                       if (exectm.tm_hour > 12) {
+                           yyerror("Hour too large for
AM");
+                           YYERROR;
+                       }
+                        else if (exectm.tm_hour == 12) {
+                            exectm.tm_hour -=12;
+                        }
+                   }
                | PM
                    {
                        if (exectm.tm_hour > 12) {
Comment 1 dkindred=redhat 1998-12-15 02:14:59 EST
(Note that the yyerror line in the patch wrapped.)
Comment 2 Cristian Gafton 1999-03-18 15:59:59 EST
Fixed in the current beta

Note You need to log in before you can comment on or make changes to this bug.