From 70b37e1beceeeb531f7a173317a2ed57c7be9a04 Mon Sep 17 00:00:00 2001 From: idgserpro Date: Wed, 4 Dec 2019 15:33:05 -0200 Subject: [PATCH] Set TZ environment variables in tests to avoid test errors tzlocal 2.0.0 verifies that the timezone it fouds has the same offset as the local computer is configured with.If not, it raise the error: ValueError: Timezone offset does not match system offset: -7200 != -10800. Please, check your config files. Setting TZ environment variable, this check is no longer done. Ref: https://github.com/regebro/tzlocal/issues/74 --- buildout.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/buildout.cfg b/buildout.cfg index a474e351..e4481877 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -44,6 +44,10 @@ eggs = ${instance:eggs} recipe = zc.recipe.egg eggs = pylint < 2.0 +[test] +initialization += + os.environ['TZ'] = 'UTC' + [zopepy] recipe = zc.recipe.egg eggs = ${instance:eggs}