Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
silkaj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
silkaj
Commits
0d57e0a3
Commit
0d57e0a3
authored
4 years ago
by
matograine
Browse files
Options
Downloads
Patches
Plain Diff
[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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
silkaj/membership.py
+3
-4
3 additions, 4 deletions
silkaj/membership.py
tests/test_membership.py
+3
-1
3 additions, 1 deletion
tests/test_membership.py
with
6 additions
and
5 deletions
silkaj/membership.py
+
3
−
4
View file @
0d57e0a3
...
...
@@ -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
=
(
...
...
This diff is collapsed.
Click to expand it.
tests/test_membership.py
+
3
−
1
View file @
0d57e0a3
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment