Skip to content

feat(internal): Add support for parsing a timestamp in a TimeZone #17080

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ErmakovDmitriy
Copy link

Summary

This PR adds new options in Time parsing for metrics.
The new options:

  • timestamp_tz
  • timestamp_tz_ms
  • timestamp_tz_us
  • timestamp_tz_ns

are similar to corresponding unix timestamp parsing with the only difference is that the timestamp_tz
time is parsed in a Timezone which is set via Timezone-related configuration options.

The motivation is to cover cases when metrics are collected from devices which do not have a concept of Timezone, UNIX time etc but still return time as "number of seconds since UNIX time but in Local timezone".

Please take a look at a discussion in #16875

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16875

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label May 30, 2025
@ErmakovDmitriy ErmakovDmitriy marked this pull request as ready for review May 30, 2025 13:59
@ErmakovDmitriy
Copy link
Author

!signed-cla

@ErmakovDmitriy ErmakovDmitriy force-pushed the implement-parser-timestamp-with-timezone branch from 5dacd50 to 35a9291 Compare June 3, 2025 14:51
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Jun 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow UNIX timestamp parsing in a Timezone
1 participant