diff --git a/sqlserver/hatch.toml b/sqlserver/hatch.toml index 551df01830de2..2a9630b10e673 100644 --- a/sqlserver/hatch.toml +++ b/sqlserver/hatch.toml @@ -7,6 +7,13 @@ os = ["linux"] version = ["2017", "2019", "2022"] setup = ["single", "ha"] +# test the compatibility of sqlserver running on non-utc timezone +[[envs.default.matrix]] +python = ["3.12"] +os = ["linux"] +version = ["2022"] +tz = ["newyork", "tokyo"] + # test the full combination of python-version/driver against a the latest sql server version # ideally we'd test this against all sql server versions but that makes the test take too long and time out. # time out. until we're able to modify and parallelize the work we'll limit the per-driver tests to only a single @@ -32,6 +39,7 @@ setup = ["single"] [envs.default.env-vars] ODBCSYSINI = "{root}{/}tests{/}odbc" COMPOSE_FOLDER = "compose" +TZ="UTC" PIP_EXTRA_INDEX_URL = "https://datadoghq.dev/ci-wheels/bin" [envs.default.overrides] @@ -62,6 +70,10 @@ matrix.version.env-vars = [ matrix.driver.env-vars = [ { key = "WINDOWS_SQLSERVER_DRIVER", platform = ["windows"] }, ] +matrix.tz.env-vars = [ + { key = "TZ", value = "America/New_York", if = ["newyork"] }, + { key = "TZ", value = "Asia/Tokyo", if = ["tokyo"] }, +] name.linux-odbc-2019-high-cardinality.env-vars = "COMPOSE_FOLDER=compose-high-cardinality" name.linux-odbc-2022-high-cardinality.env-vars = "COMPOSE_FOLDER=compose-high-cardinality" name.windows-odbc-2019-high-cardinality.env-vars = "COMPOSE_FOLDER=compose-high-cardinality-windows" diff --git a/sqlserver/tests/compose/docker-compose.yaml b/sqlserver/tests/compose/docker-compose.yaml index 84fe2603ce724..f9d5493a819b9 100644 --- a/sqlserver/tests/compose/docker-compose.yaml +++ b/sqlserver/tests/compose/docker-compose.yaml @@ -11,6 +11,7 @@ services: environment: - ACCEPT_EULA=Y - SA_PASSWORD=Password123 + - TZ=${TZ} ports: - "1433:1433" volumes: