diff options
author | Bill Nottingham <notting@redhat.com> | 2008-02-11 13:35:50 -0500 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2008-02-11 13:35:50 -0500 |
commit | 4195005f05b87bbd75c6d9dc5ca034cceecaa4b7 (patch) | |
tree | 3fad286e99fb87277ca25c5b37e4431d149c88f4 /timezone.py | |
parent | 3db06dee7802729ff373ab13f94ff78bfe50230a (diff) | |
download | anaconda-4195005f05b87bbd75c6d9dc5ca034cceecaa4b7.tar.gz anaconda-4195005f05b87bbd75c6d9dc5ca034cceecaa4b7.tar.xz anaconda-4195005f05b87bbd75c6d9dc5ca034cceecaa4b7.zip |
Use /etc/adjtime as the configuration file for UTC/not-UTC.
Also, remove ARC support while we're here - it's pointless.
Diffstat (limited to 'timezone.py')
-rw-r--r-- | timezone.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/timezone.py b/timezone.py index c58736ce4..3960d819d 100644 --- a/timezone.py +++ b/timezone.py @@ -51,20 +51,31 @@ class Timezone: f = open(instPath + "/etc/sysconfig/clock", "w") f.write('ZONE="%s"\n' % self.tz) - f.write("UTC=%s\n" % bool(self.utc)) - f.write("ARC=%s\n" % bool(self.arc)) + f.close() + + try: + f = open(instPath + "/etc/adjtime", "r") + lines = f.readlines() + f.close() + except: + lines = [ "0.0 0 0.0\n", "0\n" ] + f = open(instPath + "/etc/adjtime", "w") + f.write(lines[0]) + f.write(lines[1]) + if self.utc: + f.write("UTC\n") + else: + f.write("LOCAL\n") f.close() def getTimezoneInfo(self): - return (self.tz, self.utc, self.arc) + return (self.tz, self.utc) - def setTimezoneInfo(self, timezone, asUtc = 0, asArc = 0): + def setTimezoneInfo(self, timezone, asUtc = 0): self.tz = timezone self.utc = asUtc - self.arc = asArc def __init__(self): self.tz = "America/New_York" self.utc = 0 - self.arc = 0 |