Commit c0d22d1
xs:dateTime values without a timezone suffix (e.g. '2022-04-28T10:09:17') are parsed by
ParseISO8601FormattedDateTime as DateTimeKind.Unspecified. AsDateTimeOffset rejects these
(returning None) to keep inference strict, causing a runtime exception when the XSD
declares the field as xs:dateTime.
Fix: In TextRuntime.ConvertDateTimeOffset, fall back to AsDateTime when AsDateTimeOffset
returns None. AsDateTime already converts Unspecified to Local, so DateTimeOffset(dt)
uses the local timezone offset — matching standard xs:dateTime semantics for timezone-free
values.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Don Syme <dsyme@users.noreply.github.com>
1 parent 5e47def commit c0d22d1
2 files changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
76 | 84 | | |
77 | 85 | | |
78 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
1216 | 1224 | | |
1217 | 1225 | | |
1218 | 1226 | | |
| |||
0 commit comments