You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQL Server basic translations for AT TIME ZONE #26971
Based on the general support for AT TIME ZONE added in #26199, add some basic SQL Server translations. Note that SQL Server's AT TIME ZONE can accept either a datetime/datetime2 or a datetimeoffset, and always returns a datetimeoffset.
.NET
SQL
EF.Functions.AtTimeZone(datetimeoffset, "UTC")
datetimeoffset AT TIME ZONE 'UTC'
EF.Functions.AtTimeZone(datetime, "UTC")
datetime AT TIME ZONE 'UTC'
Note: there's also DateTimeOffset.ToOffset which can translate to SQL Server SWITCHOFFSET, but SWITCHOFFSET accepts a text expression (+08:00) whereas .NET ToOffset accepts a TimeSpan. Leaving this for now. Same goes for new DateTimeOffset(dateTime, offset) and TODATETIMEOFFSET.
Activity
Add AtTimeZoneExpression and some relevant translations
Add AtTimeZoneExpression and some relevant translations
Add AtTimeZoneExpression and some relevant translations
Add AtTimeZoneExpression and some relevant translations
Add AtTimeZoneExpression and some relevant translations
Add AtTimeZoneExpression and some relevant translations
Add AtTimeZoneExpression and some relevant translations
Add AtTimeZoneExpression and some relevant translations
Add AtTimeZoneExpression and some relevant translations (#26972)