Repository navigation
Commit a73076a
fix(io): preserve acq_time timezone in scans.tsv repair
datetime.fromisoformat() parses RFC 3339 'Z' suffix as tz-aware UTC,
but the strftime template used to renormalize the cell had no %z
placeholder — so every load silently rewrote "...Z" to "..." and
persisted the tz-stripped form back to *_scans.tsv. The
"if normalized != ts" guard could not suppress this because strftime
output structurally cannot contain 'Z', so every UTC-suffixed row
took the "differ" branch.
Split the normalization on dt.tzinfo: tz-aware inputs round-trip
through "%Y-%m-%dT%H:%M:%S.%f%z" with the offset preserved (UTC
restored to literal 'Z'; other offsets get ISO 8601 extended-form
colon). Naive inputs and the unparseable -> "n/a" path are unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent dca5f09 commit a73076a
2 files changed
Lines changed: 37 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
1049 | | - | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1050 | 1063 | | |
1051 | 1064 | | |
1052 | 1065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
388 | 411 | | |
389 | | - | |
390 | 412 | | |
391 | 413 | | |
392 | 414 | | |
| |||
0 commit comments