diff options
-rw-r--r-- | installclass.py | 4 | ||||
-rw-r--r-- | timezone.py | 23 |
2 files changed, 19 insertions, 8 deletions
diff --git a/installclass.py b/installclass.py index 68a7e37d5..e9fcbe5cc 100644 --- a/installclass.py +++ b/installclass.py @@ -263,8 +263,8 @@ class BaseInstallClass(object): def setGateway(self, id, gateway): id.network.setGateway(gateway) - def setTimezoneInfo(self, id, timezone, asUtc = 0, asArc = 0): - id.timezone.setTimezoneInfo(timezone, asUtc, asArc) + def setTimezoneInfo(self, id, timezone, asUtc = 0): + id.timezone.setTimezoneInfo(timezone, asUtc) def setAuthentication(self, id, authStr): id.auth = authStr 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 |