Skip to content

Commit c15f3ab

Browse files
Copilotkendaleiv
andcommitted
Update README.md with project documentation
Co-authored-by: kendaleiv <1012917+kendaleiv@users.noreply.github.com>
1 parent a494f92 commit c15f3ab

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
11
# t-sql-at-time-zone
2-
T-SQL AT TIME ZONE tests
2+
3+
Integration tests exercising the T-SQL [`AT TIME ZONE`](https://learn.microsoft.com/en-us/sql/t-sql/queries/at-time-zone-transact-sql) clause against SQL Server 2022 using [Testcontainers](https://dotnet.testcontainers.org/).
4+
5+
## Prerequisites
6+
7+
- [.NET 10 SDK](https://dotnet.microsoft.com/download) (or later)
8+
- [Docker](https://www.docker.com/)
9+
10+
## Running Tests
11+
12+
```bash
13+
dotnet test
14+
```
15+
16+
A SQL Server 2022 container is started automatically via Testcontainers.
17+
18+
## Test Scenarios
19+
20+
| Scenario | Windows Time Zone | IANA Time Zone |
21+
|---|---|---|
22+
| `datetime` without offset — assigns offset | `Eastern Standard Time` | `America/New_York` |
23+
| `datetimeoffset` — converts to target zone | `Pacific Standard Time` | `America/Los_Angeles` |
24+
| Daylight Saving Time transitions | `Eastern Standard Time` | `America/New_York` |
25+
| Chaining `AT TIME ZONE` | EST → PST | `America/New_York``America/Los_Angeles` |
26+
| `datetime2` with high precision | `US Eastern Standard Time` | |
27+
| `smalldatetime` | `Eastern Standard Time` | |
28+
| UTC to multiple zones (same instant) | EST / PST / CET | `America/New_York` / `America/Los_Angeles` / `Europe/Berlin` |
29+
| Half-hour offset (India) | `India Standard Time` | `Asia/Kolkata` |
30+
| Windows and IANA produce same result | `Eastern Standard Time` | `America/New_York` |
31+
32+
IANA time zone tests are skipped automatically when the SQL Server instance does not support IANA time zone names.

0 commit comments

Comments
 (0)