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 2 commits
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
17 changes: 16 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,15 @@ remap: functions: parse_timestamp: {
required: true
type: ["string"]
},

{
name: "timezone"
description: """
The [TZ database](\(urls.tz_time_zones)) format. By default, this function parses the timestamp by global [`timezone` option](\(urls.vector_configuration)/global-options#timezone).
This argument overwrites the setting and it's useful for parsing those timestamp without timezone specified such as `16/10/2019 12:00:00`.
titaneric marked this conversation as resolved.
Show resolved Hide resolved
"""
required: false
type: ["string"]
},
]
internal_failure_reasons: [
"`value` fails to parse using the provided `format`.",
Expand All @@ -34,5 +42,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"
},
]
}