Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit 0abfc0a

Browse files
fix compatibility with python 3.9
1 parent 1637921 commit 0abfc0a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

idb/analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def as_unix_timestamp(buf, wordsize=None):
3737
parse unix timestamp bytes into a timestamp.
3838
"""
3939
q = struct.unpack_from("<I", buf, 0x0)[0]
40-
return datetime.datetime.fromtimestamp(q, datetime.UTC)
40+
return datetime.datetime.fromtimestamp(q, datetime.timezone.utc)
4141

4242

4343
def as_md5(buf, wordsize=None):

scripts/dump_user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def parse_user_data(buf):
7575

7676
return {
7777
# unknown if these are in UTC or not. right now, assuming so.
78-
"ts1": datetime.datetime.fromtimestamp(ts1, datetime.UTC),
79-
"ts2": datetime.datetime.fromtimestamp(ts2, datetime.UTC),
78+
"ts1": datetime.datetime.fromtimestamp(ts1, datetime.timezone.utc),
79+
"ts2": datetime.datetime.fromtimestamp(ts2, datetime.timezone.utc),
8080
"id": id,
8181
"name": name,
8282
}

0 commit comments

Comments
 (0)