Skip to content

Commit 9afd78c

Browse files
Copilotkendaleiv
andcommitted
Fix IANA support ambiguity and add Azure SQL time zone documentation
Co-authored-by: kendaleiv <1012917+kendaleiv@users.noreply.github.com>
1 parent 5050134 commit 9afd78c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,12 @@ if (TimeZoneInfo.TryConvertIanaIdToWindowsId(ianaTimeZone, out var windowsTimeZo
5757
}
5858
```
5959

60-
SQL Server 2022 supports IANA time zone names directly in `AT TIME ZONE` — the integration tests in this repository confirm this against SQL Server 2022. For older SQL Server versions that only recognize Windows time zone names, use the C# conversion above to translate the browser's IANA time zone before passing it to `AT TIME ZONE`.
60+
SQL Server and Azure SQL officially support only **Windows time zone names** (e.g. `Eastern Standard Time`) in `AT TIME ZONE` — IANA names like `America/New_York` are not recognized. The C# conversion above is the recommended approach when accepting IANA time zones from browser clients. The integration tests in this repository detect IANA support at runtime via `sys.time_zone_info` behavior and skip IANA-specific tests when the SQL Server instance does not support them.
61+
62+
## Azure SQL
63+
64+
Azure SQL Database also uses **Windows time zone names** exclusively in `AT TIME ZONE`. IANA time zone names from browser clients must be converted to Windows IDs using `TimeZoneInfo.TryConvertIanaIdToWindowsId` before being passed to queries. You can query the supported time zones with:
65+
66+
```sql
67+
SELECT * FROM sys.time_zone_info;
68+
```

0 commit comments

Comments
 (0)