Skip to content

Commit

Permalink
Uses TZ = UTC in buildout
Browse files Browse the repository at this point in the history
This ensures that tests using datetime will work locally on machines
using TZ = GMT
  • Loading branch information
wesleybl committed Feb 23, 2024
1 parent 53609d8 commit f6c62ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ recipe = collective.xmltestreport
eggs = ${buildout:test-eggs}
defaults = ['--auto-color', '--auto-progress', '--ignore_dir=.git', '--ignore_dir=bower_components', '--ignore_dir=node_modules']
environment = environment
initialization =
# Ensures that tests using datetime will work locally on machines using TZ = GMT
os.environ['TZ'] = 'UTC'
import time
try:
time.tzset()
except AttributeError:
# function not available on Windows
pass

[robot]
recipe = zc.recipe.egg
Expand Down

0 comments on commit f6c62ec

Please sign in to comment.