Open guilload opened 1 year ago
Maybe default_timezone
?
default_timezone
sounds better, indeed.
I think we should raise an error during the parsing of the config if the user provides a format with a timezone and a default timezone (%z
or %Z
). It's better to fail early. Any opinion @fulmicoton ?
Parsing a timezone like America/New_York
and use it to compute a timestamp from a date string requires a TZ database. The most popular / better maintained one seems to be chrono-tz, but we use time
almost everywhere in Quickwit (and Tantivy). There is a time-tz crate that would fit more nicely into the existing code, but it appears to be substantially less used.
In #5248 I'm rewriting a tiny bit the code that parse dates. It will be possible to pass an utc offset which might simplify this issue. Getting the offset from the timezone will require a bit of work/wits however.
You may also have a look at https://github.com/quickwit-oss/quickwit/tree/guilload/strptime-timezone
For instance: