Skip to content

Commit c332971

Browse files
BjrInthoh
authored andcommitted
fix: send all dates as iso 8601
1 parent b89239f commit c332971

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/aleph/vm/orchestrator/views/operator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ def is_token_still_valid(timestamp):
2727
"""
2828
Checks if a token has exprired based on its timestamp
2929
"""
30-
timestamp = int(timestamp)
3130
current_datetime = datetime.now(tz=timezone.utc)
32-
target_datetime = datetime.fromtimestamp(timestamp, tz=timezone.utc)
31+
target_datetime = datetime.fromisoformat(timestamp, tz=timezone.utc)
3332

3433
return target_datetime > current_datetime
3534

@@ -78,7 +77,7 @@ class SignedPubKeyPayload(BaseModel):
7877
# alg: Literal["ECDSA"]
7978
domain: str
8079
address: str
81-
expires: float # timestamp # TODO: move to ISO 8601
80+
expires: str
8281

8382
@property
8483
def json_web_key(self) -> Jwk:

0 commit comments

Comments
 (0)