From 8e048da78b4fa6ad3f413fe63adcdf7840927e56 Mon Sep 17 00:00:00 2001 From: Rob Simpson Date: Mon, 21 Aug 2023 15:29:34 -0500 Subject: [PATCH] fix: time too precise Signed-off-by: Rob Simpson --- aries_cloudagent/ledger/indy.py | 6 +++++- aries_cloudagent/ledger/indy_vdr.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/ledger/indy.py b/aries_cloudagent/ledger/indy.py index a127f8c028..2c4abc6ac7 100644 --- a/aries_cloudagent/ledger/indy.py +++ b/aries_cloudagent/ledger/indy.py @@ -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 diff --git a/aries_cloudagent/ledger/indy_vdr.py b/aries_cloudagent/ledger/indy_vdr.py index ef2e403a71..0fd637875a 100644 --- a/aries_cloudagent/ledger/indy_vdr.py +++ b/aries_cloudagent/ledger/indy_vdr.py @@ -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