Skip to content

Commit 14e5836

Browse files
authored
opentelemetry Exporter drop use of deprecated utcnow (#34469)
1 parent dd01793 commit 14e5836

File tree

1 file changed

+1
-1
lines changed
  • sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter

1 file changed

+1
-1
lines changed

sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def _fmt(timestamp):
1717

1818

1919
def _now():
20-
return datetime.datetime.utcnow()
20+
return datetime.datetime.now(tz=datetime.timezone.utc)
2121

2222

2323
def _seconds(seconds):

0 commit comments

Comments
 (0)