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

feat: convert timezone to UTC if tzinfo exists #113

Merged
merged 3 commits into from
Jun 23, 2020

Conversation

kaheicanaan
Copy link
Contributor

Closes #112

Auto-converts timestamp with timezone to UTC.

  • CHANGELOG.md updated
  • Rebased/mergeable
  • Tests pass
  • Sign CLA (if not already signed)

Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

@kaheicanaan thanks for PR.

Could you please add tests to

class PointTest(BaseTest):
that cover your changes?

@kaheicanaan
Copy link
Contributor Author

@bednar Just added a test case to ensure that two points at the same timestamp (with different timezone) are identical under the to_line_protocol() method.

https://github.com/kaheicanaan/influxdb-client-python/blob/532766c478f93a59ed73b265843e7ab10f7eeccb/tests/test_point.py#L312

@kaheicanaan kaheicanaan requested a review from bednar June 23, 2020 07:22
Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

Thanks @kaheicanaan for this PR!

@bednar bednar added this to the 1.9.0 milestone Jun 23, 2020
@bednar bednar added the enhancement New feature or request label Jun 23, 2020
@bednar bednar merged commit 5ddf643 into influxdata:master Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support timestamp with different timezone in _convert_timestamp
2 participants