Skip to content

Commit

Permalink
Only run time.tzset() if not windows
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Dec 5, 2023
1 parent f5ce09f commit 3110a0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,5 @@ def setup_otel():
@pytest.fixture(autouse=True)
def set_timezone():
os.environ["TZ"] = "UTC"
time.tzset()
if platform.system() != "Windows":
time.tzset()
4 changes: 3 additions & 1 deletion tests/unit/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import platform
import urllib.request

from unittest import mock
Expand Down Expand Up @@ -46,7 +47,8 @@ def test_confirm_connections_blocked():
@pytest.fixture(autouse=True)
def set_timezone():
os.environ["TZ"] = "UTC"
time.tzset()
if platform.system() != "Windows":
time.tzset()


@pytest.fixture(scope="session")
Expand Down

0 comments on commit 3110a0c

Please sign in to comment.