diff --git a/over/text.py b/over/text.py index 7da1236..c4e312c 100644 --- a/over/text.py +++ b/over/text.py @@ -11,6 +11,7 @@ import struct import sys import time import termios +import tzlocal # -------------------------------------------------- @@ -322,7 +323,7 @@ class Output: - indentation start marker """ - def __init__(self, name, format="[%Y-%m-%d %H:%M:%S] <@> -- , ", colors=True, end=".\n", indent=True, stream=sys.stderr): + def __init__(self, name, format="[%Y-%m-%d %H:%M:%S %Z] <@> -- , ", colors=True, end=".\n", indent=True, stream=sys.stderr): self.name = name self.format = format self.colors = colors and stream.isatty() @@ -340,7 +341,7 @@ class Output: colors = colors or self.colors end = end or self.end - output = datetime.datetime.now().strftime(format) + output = datetime.datetime.now(tzlocal.get_localzone()).strftime(format) output = output.replace("<@>", tag) output = output.replace("", self.name)