Skip to content
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

docs(vrl): add docs for new timezone option in parse_timestamp function #22121

Merged
merged 6 commits into from
Jan 10, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion website/cue/reference/remap/functions/parse_timestamp.cue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ remap: functions: parse_timestamp: {
required: true
type: ["string"]
},

{
name: "timezone"
description: "The [TZ database](\(urls.tz_time_zones)) format."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's describe a bit more here when this option is useful. You wrote some good context in the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried to add more details to the timezone argument

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, let's wait for a review from the docs team.

required: false
type: ["string"]
},
]
internal_failure_reasons: [
"`value` fails to parse using the provided `format`.",
Expand All @@ -34,5 +39,12 @@ remap: functions: parse_timestamp: {
"""#
return: "2020-10-10T16:00:00Z"
},
{
title: "Parse timestamp with timezone"
source: #"""
parse_timestamp!("16/10/2019 12:00:00", format: "%d/%m/%Y %H:%M:%S", timezone: "Europe/Paris")
"""#
return: "2019-10-16T11:00:00Z"
},
]
}
Loading