[master 1/1] Assume UTC if setting the system time without a timezone (#1200444)
dashea
installerbot-noreply at redhat.com
Mon Mar 23 20:03:54 UTC 2015
From: David Shea <dshea at redhat.com>
---
pyanaconda/isys/__init__.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyanaconda/isys/__init__.py b/pyanaconda/isys/__init__.py
index 67667bd..55c7da5 100644
--- a/pyanaconda/isys/__init__.py
+++ b/pyanaconda/isys/__init__.py
@@ -122,6 +122,10 @@ def set_system_date_time(year=None, month=None, day=None, hour=None, minute=None
"""
+ # If no timezone is set, use UTC
+ if not tz:
+ tz = pytz.UTC
+
# get the right values
now = datetime.datetime.now(tz)
year = year if year is not None else now.year
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/38ad521d89e6d6f7d28f3c58db02ba76af4b635c
More information about the anaconda-patches
mailing list