From a9bbf6a3d44f3e94a6efa1c17fd44d377e6a0319 Mon Sep 17 00:00:00 2001 From: matograine <tom.ngr@zaclys.net> Date: Thu, 6 May 2021 16:13:46 +0200 Subject: [PATCH] [enh] #344 use pendulum: * make membership display use local timezone --- silkaj/membership.py | 5 ++++- tests/test_membership.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/silkaj/membership.py b/silkaj/membership.py index a9b63ffb..85497b72 100644 --- a/silkaj/membership.py +++ b/silkaj/membership.py @@ -138,7 +138,10 @@ async def display_confirmation_table(identity_uid, pubkey, identity_timestamp): block = await client(bma.blockchain.block, identity_timestamp.number) table.append( - ["Identity published", pendulum.from_timestamp(block["time"]).format("LL")] + [ + "Identity published", + pendulum.from_timestamp(block["time"], tz="local").format("LL"), + ] ) params = await BlockchainParams().params diff --git a/tests/test_membership.py b/tests/test_membership.py index 7ae7f5fb..71c3309c 100644 --- a/tests/test_membership.py +++ b/tests/test_membership.py @@ -180,7 +180,10 @@ async def test_display_confirmation_table( block = await client(bma.blockchain.block, identity_timestamp.number) table.append( - ["Identity published", pendulum.from_timestamp(block["time"]).format("LL")], + [ + "Identity published", + pendulum.from_timestamp(block["time"], tz="local").format("LL"), + ], ) params = await BlockchainParams().params -- GitLab