Skip to content

Commit

Permalink
feat: use local time zone to show creation date (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtdang authored Nov 26, 2024
1 parent 92674ef commit 04e92f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion silverback/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)")
Expand Down

0 comments on commit 04e92f5

Please sign in to comment.