Skip to content

Commit

Permalink
Fix tests that involving dates in Python 3.8 on machines that don't u…
Browse files Browse the repository at this point in the history
…se (#1195)

TZ = UTC

In Python 3.8, for the TZ environment variable to be recognized, you
need to call time.tzset()

Ref: plone/buildout.coredev#701
  • Loading branch information
wesleybl authored Aug 31, 2021
1 parent 19779d2 commit b96f3df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ recipe = zc.recipe.testrunner
eggs = ${instance:eggs}
initialization =
os.environ['TZ'] = 'UTC'
# In Python 3.8+, for the TZ environment variable to be used, it's
# necessary to explicitly call time.tzset().
import time
time.tzset()
os.environ['ZSERVER_PORT'] = '55001'
defaults = ['-s', 'plone.restapi', '--auto-color', '--auto-progress']

Expand Down

0 comments on commit b96f3df

Please sign in to comment.