Add system time zone designation. Closes #21.

This commit is contained in:
Ske
2018-12-18 19:38:53 +01:00
parent e8d1c5bf90
commit 570899928a
8 changed files with 89 additions and 13 deletions

View File

@@ -172,7 +172,7 @@ async def member_card(conn, member: Member) -> discord.Embed:
return card
async def front_status(switch: Switch, conn) -> discord.Embed:
async def front_status(ctx: "CommandContext", switch: Switch, conn) -> discord.Embed:
if switch:
embed = status("")
fronter_names = [member.name for member in await switch.fetch_members(conn)]
@@ -186,7 +186,7 @@ async def front_status(switch: Switch, conn) -> discord.Embed:
if switch.timestamp:
embed.add_field(name="Since",
value="{} UTC ({})".format(switch.timestamp.isoformat(sep=" ", timespec="seconds"),
value="{} ({})".format(ctx.format_time(switch.timestamp),
display_relative(switch.timestamp)))
else:
embed = error("No switches logged.")