Closed amorison closed 1 month ago
datetime.now() returns a naive timestamp in the local TZ. When formatting this timestamp, %z and %Z directives would therefore always be empty.
datetime.now()
%z
%Z
This commit calls .astimezone() to attach the system TZ to this timestamp. %z and %Z directives when formatting the timestamp are now respected.
.astimezone()
datetime.now()
returns a naive timestamp in the local TZ. When formatting this timestamp,%z
and%Z
directives would therefore always be empty.This commit calls
.astimezone()
to attach the system TZ to this timestamp.%z
and%Z
directives when formatting the timestamp are now respected.