Commit 5aab142
committed
Fix parsing of timestamps with newer lava
In the latest version of lava the dt field is created with
atetime.datetime.now(datetime.UTC).isoformat() rather then
datetime.datetime.utcnow().isoformat(). This causes the timezone
specifier to be added (always +00:00 as the logs are UTC)'.
From a Rust perspective the former is a `NaiveDateTime` (no timezone)
while the later is a `DateTime<Utc>`. Adjust the parsing to try both,
but convert to NaiveDateTime to keep the same user API. In future
potentially this could be moved to always be a DateTime to make it more
clear to the end-user what the stamp is1 parent 65295ba commit 5aab142
1 file changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
221 | 237 | | |
222 | 238 | | |
| 239 | + | |
223 | 240 | | |
224 | 241 | | |
225 | 242 | | |
| |||
302 | 319 | | |
303 | 320 | | |
304 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
0 commit comments