File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
opentelemetry-sdk/src/opentelemetry/sdk/util Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## Unreleased
9
9
10
+ - Fix python 3.12 deprecation warning
11
+ ([ #3751 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/3751 ) )
12
+
10
13
## Version 1.23.0/0.44b0 (2024-02-23)
11
14
12
15
- Use Attribute rather than boundattribute in logrecord
Original file line number Diff line number Diff line change 23
23
24
24
def ns_to_iso_str (nanoseconds ):
25
25
"""Get an ISO 8601 string from time_ns value."""
26
- ts = datetime .datetime .utcfromtimestamp (nanoseconds / 1e9 )
26
+ ts = datetime .datetime .fromtimestamp (
27
+ nanoseconds / 1e9 , tz = datetime .timezone .utc
28
+ )
27
29
return ts .strftime ("%Y-%m-%dT%H:%M:%S.%fZ" )
28
30
29
31
You can’t perform that action at this time.
0 commit comments