summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--py/mock/backend.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/py/mock/backend.py b/py/mock/backend.py
index 2bc63df..86b3fb7 100644
--- a/py/mock/backend.py
+++ b/py/mock/backend.py
@@ -263,6 +263,13 @@ class Root(object):
# create rpmbuild dir
self._buildDirSetup()
+ # set up timezone to match host
+ localtimedir = self.makeChrootPath('etc')
+ localtimepath = self.makeChrootPath('etc', 'localtime')
+ if os.path.exists(localtimepath):
+ os.remove(localtimepath)
+ shutil.copy2('/etc/localtime', localtimedir)
+
# done with init
self._callHooks('postinit')