Bug 1316553

Summary: at does not post a job with the correct time when the UTC timezone is specified
Product: Red Hat Enterprise Linux 6 Reporter: Stuart Newman <stuart.j.newman>
Component: atAssignee: Tomas Mraz <tmraz>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-29 09:08:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stuart Newman 2016-03-10 13:09:31 UTC
Description of problem: The system clock is configured for UTC.  When an at request is made using the form 

    at 16:00 UTC,

the time displayed is is 15:00 rather than 16:00


Version-Release number of selected component (if applicable):3.1.10-48.el6


How reproducible: always


Steps to Reproduce:
1.Configure the system clock for UTC
2.Key in at 16:00 UTC
3.Key in atq to display the at queue

Actual results:
5	2016-03-10 15:00 a root

Expected results:
5	2016-03-10 16:00 a root

Additional info:

Comment 2 Tomas Mraz 2016-03-14 10:55:27 UTC
Please use the regular Red Hat support channels https://www.redhat.com/support to help to prioritize the bug fix appropriately.

Comment 3 Stuart Newman 2016-03-25 14:50:42 UTC
The problem is caused by code in the parsetime subprogram in parsetime.y . exectm is moved to currtm after exectm.tm_isdst is set to -1. Nothing ever resets currtm.tm_isdst to either 0 or 1. When execution reaches line 508, currtm.tm_isdst is still -1, causing the test to pass, reducing the scheduled time by one hour. The proposed fix moves exectm to currtm before exectm.tm_isdst is set to -1. The proposed fix (based on line numbers in at-3.1.10-48.el6.i686 is 479a480 > memcpy(&currtm,&exectm,sizeof(currtm)); 482d482 < memcpy(&currtm,&exectm,sizeof(currtm));

Comment 4 Tomas Mraz 2016-03-29 09:05:02 UTC
I do not think this is proper fix either. The dst correction is incorrect. I committed the proper fix to the current Fedora rawhide package.

I am sorry that I have to repeat that if you need the fix in the RHEL package, please report it via regular Red Hat support channels so it can be properly prioritized.

Comment 5 Tomas Mraz 2016-03-29 09:08:58 UTC
Ah I see there is already such report. If it was not you who opened it, please open it too so the priority is raised.

*** This bug has been marked as a duplicate of bug 1320322 ***