Skip to content

Commit

Permalink
fix: time too precise
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Simpson <[email protected]>
  • Loading branch information
Rob Simpson authored and Rob Simpson committed Aug 21, 2023
1 parent 94680bf commit 8e048da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion aries_cloudagent/ledger/indy.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,11 @@ def taa_rough_timestamp(self) -> int:
Anything more accurate is a privacy concern.
"""
return int(datetime.combine(date.today(), datetime.min.time()).timestamp())
return int(
datetime.combine(
date.today(), datetime.min.time(), datetime.timezone.utc
).timestamp()
)

async def accept_txn_author_agreement(
self, taa_record: dict, mechanism: str, accept_time: int = None
Expand Down
6 changes: 5 additions & 1 deletion aries_cloudagent/ledger/indy_vdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,11 @@ def taa_rough_timestamp(self) -> int:
Anything more accurate is a privacy concern.
"""
return int(datetime.combine(date.today(), datetime.min.time()).timestamp())
return int(
datetime.combine(
date.today(), datetime.min.time(), datetime.timezone.utc
).timestamp()
)

async def accept_txn_author_agreement(
self, taa_record: dict, mechanism: str, accept_time: int = None
Expand Down

0 comments on commit 8e048da

Please sign in to comment.