Skip to content
Snippets Groups Projects
Commit 0d57e0a3 authored by matograine's avatar matograine
Browse files

[enh] #344 Membership : display time in local timezone.

parent fad9e8ba
No related branches found
No related tags found
1 merge request!177#344: Fix import loop issue, Generalize pendulum usage
......@@ -30,7 +30,7 @@ from silkaj.tools import coroutine
from silkaj.network_tools import ClientInstance
from silkaj.blockchain_tools import BlockchainParams, HeadBlock
from silkaj.license import license_approval
from silkaj.constants import SUCCESS_EXIT_STATUS
from silkaj.constants import SUCCESS_EXIT_STATUS, DATE
@click.command(
......@@ -137,9 +137,8 @@ async def display_confirmation_table(identity_uid, pubkey, identity_timestamp):
table.append(["Block Identity", str(identity_timestamp)[:45] + ""])
block = await client(bma.blockchain.block, identity_timestamp.number)
table.append(
["Identity published", pendulum.from_timestamp(block["time"]).format("LL")]
)
date_idty_pub = pendulum.from_timestamp(block["time"], tz="local").format(DATE)
table.append(["Identity published", date_idty_pub])
params = await BlockchainParams().params
membership_validity = (
......
......@@ -47,6 +47,7 @@ from silkaj.blockchain_tools import BlockchainParams, HeadBlock
from silkaj.constants import (
SUCCESS_EXIT_STATUS,
FAILURE_EXIT_STATUS,
DATE,
)
from silkaj.tui import display_pubkey_and_checksum
......@@ -179,8 +180,9 @@ async def test_display_confirmation_table(
table.append(["Block Identity", str(identity_timestamp)[:45] + ""])
block = await client(bma.blockchain.block, identity_timestamp.number)
date_idty_pub = pendulum.from_timestamp(block["time"], tz="local").format(DATE)
table.append(
["Identity published", pendulum.from_timestamp(block["time"]).format("LL")],
["Identity published", date_idty_pub],
)
params = await BlockchainParams().params
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment