diff --git a/pym/cl_fill_install.py b/pym/cl_fill_install.py index fa879ac..6a2031a 100644 --- a/pym/cl_fill_install.py +++ b/pym/cl_fill_install.py @@ -638,14 +638,15 @@ class fillVars(object, glob_attr): """timezone for clock""" zoneinfodir = "/usr/share/zoneinfo/" localtimefile = "/etc/localtime" + timezonefile = "/etc/timezone" # try get timezone from kernel calculate param timezone = self.getValueFromCmdLine("calculate",2) if timezone and \ path.exists(path.join(zoneinfodir,timezone)): return timezone - # get timezone from localtime symlink - if path.islink(localtimefile): - return os.readlink(localtimefile).replace(zoneinfodir,"") + # get timezone from /etc/timezone + if path.exists(timezonefile): + return open(timezonefile,"r").read().strip() return "UTC" def get_os_install_clock_type(self):