Fix python 3.12 deprecation warning by jenshnielsen · Pull Request #3751 · open-telemetry/opentelemetry-python
Description
utcfromtimestamp is deprecated replace
with fromtimestamp with explict UTC timezone
See https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp
Type of change
Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
- This change requires a documentation update
How Has This Been Tested?
This is a simple bug fix to an existing line that is already tested
Does This PR Require a Contrib Repo Change?
Answer the following question based on these examples of changes that would require a Contrib Repo Change:
-
The OTel specification has changed which prompted this PR to update the method interfaces of
opentelemetry-api/oropentelemetry-sdk/ -
The method interfaces of
test/utilhave changed -
Scripts in
scripts/that were copied over to the Contrib repo have changed -
Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in
pyproject.tomlisort.cfg.flake8
-
When a new
.github/CODEOWNERis added -
Major changes to project information, such as in:
README.mdCONTRIBUTING.md
-
Yes. - Link to PR:
-
No.
Checklist:
- Followed the style guidelines of this project
- Changelogs have been updated
- Unit tests have been added N/A
- Documentation has been updated N/A