Skip to content

Avoid deprecated UTC timestamp conversion#115

Draft
Mirochill wants to merge 1 commit into
vklochan:masterfrom
Mirochill:fix-114-utcfromtimestamp
Draft

Avoid deprecated UTC timestamp conversion#115
Mirochill wants to merge 1 commit into
vklochan:masterfrom
Mirochill:fix-114-utcfromtimestamp

Conversation

@Mirochill
Copy link
Copy Markdown

Summary

  • Replace datetime.utcfromtimestamp() in the Logstash timestamp formatter with datetime.fromtimestamp(..., UTC).
  • Add a small UTC tzinfo fallback so the package's declared Python 2 support still has a timezone object when datetime.timezone is unavailable.

Closes #114

Validation

  • git diff --check HEAD~1..HEAD
  • rg -n "utcfromtimestamp|fromtimestamp|timezone|class _UTC|UTC =" logstash/formatter.py
  • Not run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

warning occurs

1 participant