Skip to content

Pin forked test JVMs to UTC#862

Open
phdoerfler wants to merge 1 commit into
typelevel:mainfrom
phdoerfler:fix/mssql-utc-timezone-pin
Open

Pin forked test JVMs to UTC#862
phdoerfler wants to merge 1 commit into
typelevel:mainfrom
phdoerfler:fix/mssql-utc-timezone-pin

Conversation

@phdoerfler

Copy link
Copy Markdown
Contributor

Datetime tests in the MSSQL suite (MovieSuite's moviesShownBetween and computed-field cases) fail on a developer machine in a non-UTC time zone, while passing in CI. The MSSQL test codec encodes an OffsetDateTime argument via a zone-naive java.sql.Timestamp (Timestamp.from(o.toInstant)), and mssql-jdbc derives the wall-clock value it binds into a DATETIMEOFFSET parameter using the ambient JVM time zone. On a UTC+2 host the filter bound shifts by two hours, admitting an extra row. Postgres is immune (native Meta[OffsetDateTime]); Oracle uses the same Timestamp codec but ojdbc binds it without the shift; CI runs in UTC so it never surfaces there.

It might be a better idea to fix this not via the build but through changing the code but I wanted to keep the mssql backend similar to the oracle backend which does not have this issue.

@phdoerfler
phdoerfler force-pushed the fix/mssql-utc-timezone-pin branch from 72e1a4c to cdc4f5b Compare July 12, 2026 13:39
Datetime tests in the MSSQL suite (MovieSuite's `moviesShownBetween` and
computed-field cases) fail on a developer machine in a non-UTC time zone,
though they pass in CI. The MSSQL test codec encodes an OffsetDateTime
argument via a zone-naive `java.sql.Timestamp`, and mssql-jdbc binds it
into a DATETIMEOFFSET parameter using the ambient JVM time zone. On a
UTC+2 host the filter bound shifts by two hours, admitting an extra row.
Postgres is immune (native `Meta[OffsetDateTime]`); Oracle uses the same
codec but ojdbc binds it without the shift; CI runs in UTC so it never
surfaces there.
@phdoerfler
phdoerfler force-pushed the fix/mssql-utc-timezone-pin branch from cdc4f5b to ec2106c Compare July 17, 2026 13:38

@milessabin milessabin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I fully understand the issue here. I'm not seeing a problem with the mssql tests when I run them locally in UTC+1.

@milessabin

Copy link
Copy Markdown
Member

I think if the issue is mssql-specific I would prefer the fix to be as well. I'm neutral on whether that should be in the build or in the test code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants