Bug 426 - at-3.17: 12am bug
Summary: at-3.17: 12am bug
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: at   
(Show other bugs)
Version: 5.2
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1998-12-15 07:10 UTC by dkindred=redhat
Modified: 2008-05-01 15:37 UTC (History)
0 users

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


Attachments (Terms of Use)

Description dkindred=redhat 1998-12-15 07:10:59 UTC
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 07:14:59 UTC
(Note that the yyerror line in the patch wrapped.)

Comment 2 Cristian Gafton 1999-03-18 20:59:59 UTC
Fixed in the current beta


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