Bug 1312135

Summary: timezone.py defaults to LOCAL time when using a kickstart file where timezone is not specified
Product: Red Hat Enterprise Linux 7 Reporter: William Skupa <skupawa>
Component: anacondaAssignee: Martin Kolman <mkolman>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: jstodola, mhruscak, mkolman
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-21.48.22.78-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 23:22:39 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 William Skupa 2016-02-25 20:25:34 UTC
Description of problem:
Kickstarting an install with Timezone not specified and instead selected from the GUI, causes the resulting system time to be off by the timezone selected offset because the hwclock and adjtime are set to LOCAL.

Removing the check for flags.automatedInstall from timezone.py corrects the issue

Version-Release number of selected component (if applicable):
anaconda 21.48.22.56-1

How reproducible:
100%

Steps to Reproduce:
1. Create a kickstart file for a fully automated install, except don't specify timezone or root's password 
2. Install system using kickstart file
3. After install verify time is now LOCAL by running:
    cat /mnt/sysimage/etc/adjtime

Actual results:
Installed system has the wrong time and is using LOCAL time

Expected results:
Installed system has the correct time and is using UTC time


Additional info:

Comment 2 Martin Kolman 2016-05-31 15:09:54 UTC
I think this is actually the correct behavior and it has been like this at least since RHEL 5 - if you do a kickstart installation and want the hwclock to be considered in UTC you need to use the --utc option:

RHEL 5: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/s1-kickstart2-options.html
RHEL 6: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html
RHEL 7: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html

Of that does not really cover the case where you install with partial kickstart and want the user to set the timezone manually while assuming the hwclock is in UTC.

Maybe making it possible to just use "timezone --utc" without a timezone would work ? It would still ask the user to set the timezone but assume the hwclock is in UTC.

Comment 6 Marek Hruscak 2016-08-24 16:53:25 UTC
Option timezone --utc without specific timezone is now able to use to instruct anaconda to use UTC instead of LOCAL.

Comment 8 errata-xmlrpc 2016-11-03 23:22:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2158.html