Repository navigation
Commit 43e4eb7
authored
fix(core): parse timestamps with any number of fractional-second digits (#9186)
ConvertStringToTime and ConvertStringToTimeInLoc matched timestamps with a
`+hh:mm` offset against fixed-width layouts (".000" and ".000000"). Any
other precision failed: .NET's round-trip format (7 digits, e.g. PowerShell
`Get-Date -Format o`), Go's RFC3339Nano (up to 9 digits, trailing zeros
trimmed) and trimmed 4/5-digit values all returned a parse error.
This parser backs the mapstructure decode hook, so a webhook deployment or
incident posted with such a timestamp was rejected with 400 and never
counted, and an Iso8601Time field in an extractor failed the subtask.
Replace the two fixed-width entries with one entry that accepts any
fraction length through the ".999999999" layout.
Generated-by: Claude Code (Claude Opus 5.5)
Co-authored-by: breken-ai <312387581+breken-ai@users.noreply.github.com>1 parent 7e680b3 commit 43e4eb7
2 files changed
Lines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
160 | 184 | | |
161 | 185 | | |
162 | 186 | | |
| |||
311 | 335 | | |
312 | 336 | | |
313 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
314 | 345 | | |
315 | 346 | | |
316 | 347 | | |
| |||
0 commit comments