Skip to content

Commit 87f69e6

Browse files
committed
drop arrow dependency
1 parent c3dd18c commit 87f69e6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/common-library/src/common_library/error_codes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
import hashlib
1111
import re
1212
import traceback
13-
from datetime import datetime
13+
from datetime import UTC, datetime
1414
from typing import Annotated, Final, TypeAlias
1515

16-
import arrow
1716
from pydantic import StringConstraints, TypeAdapter
1817

1918
_LABEL = "OEC:{fingerprint}-{timestamp}"
@@ -49,7 +48,7 @@ def _create_timestamp() -> int:
4948
"""Timestamp as milliseconds since epoch
5049
NOTE: this reduces the precission to milliseconds but it is good enough for our purpose
5150
"""
52-
ts = arrow.utcnow().float_timestamp * _MILISECONDS
51+
ts = datetime.now(UTC).timestamp() * _MILISECONDS
5352
return int(ts)
5453

5554

0 commit comments

Comments
 (0)