Skip to content

Conversation

@jonahgeorge
Copy link
Owner

@jonahgeorge jonahgeorge commented Apr 12, 2024

This PR adds minimal support for SQL Server (similar to SQLite, without day_start or timezone support) .

I originally went down the path of attempting time zone support via the SWITCHOFFSET method with ActiveSupport::TimeZone#formatted_offset; however, when considering older dates this was not accounting for DST (WIP here).

Instead, it appears to properly support timezones one would need to use the AT TIME ZONE operator; however, SQL Server requires Windows timezone names and outside of CLDR I have not found a maintained mapping.

Callouts:

  • @@DATEFIRST is required to be considered when doing week-math as MSSQL allows one to configure what the start of the week is.

Blocked by:

@jonahgeorge jonahgeorge force-pushed the sql_server branch 6 times, most recently from eca600b to e3dd312 Compare April 12, 2024 21:32
@jonahgeorge jonahgeorge force-pushed the sql_server branch 2 times, most recently from e10941b to 90f7967 Compare July 2, 2024 04:57
@jonahgeorge jonahgeorge changed the title Add WIP SQL Server support Add SQL Server support Jul 2, 2024
@jonahgeorge jonahgeorge force-pushed the sql_server branch 7 times, most recently from 09a7b3d to 5406cd1 Compare July 2, 2024 08:04
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