Skip to content

Commit

Permalink
Merge pull request #3 from scop/refactor/py312-utc-deprecation
Browse files Browse the repository at this point in the history
Use aware timezone internally in timestamped formatting
  • Loading branch information
jaraco committed Dec 23, 2023
2 parents 67a144f + 5dda5db commit 2c3923e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions jaraco/logging.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import logging
import time
import datetime
import string
import http.client

Expand Down Expand Up @@ -133,7 +132,7 @@ def get_filename(self, t):
if self._period_seconds:
t -= t % self._period_seconds
# convert it to a datetime object for formatting
dt = datetime.datetime.utcfromtimestamp(t)
dt = tempora.utc.fromtimestamp(t)
# append the datestring to the filename
# workaround for datetime.strftime not handling '' properly
appended_date = (
Expand Down
1 change: 1 addition & 0 deletions newsfragments/3.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replaced deprecated datetime.utcfromtimestamp.

0 comments on commit 2c3923e

Please sign in to comment.