From 04e92f585ced7d19b9427e33bbc69a4b966eb9c8 Mon Sep 17 00:00:00 2001 From: Dalena Date: Tue, 26 Nov 2024 12:22:11 -0600 Subject: [PATCH] feat: use local time zone to show creation date (#173) --- silverback/_cli.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/silverback/_cli.py b/silverback/_cli.py index d5b14aa1..7ab31b30 100644 --- a/silverback/_cli.py +++ b/silverback/_cli.py @@ -39,6 +39,8 @@ from silverback.cluster.client import ClusterClient, PlatformClient +LOCAL_DATETIME = "%Y-%m-%d %H:%M:%S %Z" + @click.group(cls=SectionedHelpGroup) @click.version_option(message="%(version)s", package_name="silverback") @@ -223,7 +225,10 @@ def workspace_info(platform: "PlatformClient", workspace: str): click.echo(f"{click.style('Name', fg='green')}: {workspace_info.name}") click.echo(f"{click.style('Slug', fg='green')}: '{workspace_info.slug}'") - click.echo(f"{click.style('Date Created', fg='green')}: '{workspace_info.created}'") + click.echo( + f"{click.style('Date Created', fg='green')}: " + f"{workspace_info.created.astimezone().strftime(LOCAL_DATETIME)}" + ) @workspaces.command(name="new", section="Platform Commands (https://silverback.apeworx.io)")