-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timezone support for parse_timestamp #962
Comments
I think this would be useful to have at the function level, but just a note that it is possible to configure the I'll move this request to the VRL repository. |
Hi, I just dig into parse_text_with_tz {
args: func_args![
value: "16/10/2019:12:00:00",
format:"%d/%m/%Y:%H:%M:%S"
],
want: Ok(value!(
DateTime::parse_from_rfc2822("Wed, 16 Oct 2019 10:00:00 +0000")
.unwrap()
.with_timezone(&Utc)
)),
tdef: TypeDef::timestamp().fallible(),
tz: TimeZone::Named(chrono_tz::Europe::Paris),
} I also notice that timezone could be set in vector's config. Default value for timezone is Could you provide example and its expected output? |
@sandervandegeijn I believe we want the ability to provide a timezone to |
Hi @titaneric, does this comment answer your questions? We basically have different cases (encoded timezone, configured timezone, suggested timezone parameter) |
Yes, I think I could give it a try |
Fantastic, thank you! |
A note for the community
Use Cases
I have a timestamp in localtime. Vector assumes it is UTC, offsetting the time with 2 hours (CEST currently, Europe/Amsterdam). Adding a timezone parameter can solve this.
Attempted Solutions
Offsetting by hand, but we have summertime and wintertime...
Proposal
Implement timezone parameter
References
No response
Version
0.39
The text was updated successfully, but these errors were encountered: