mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-11 01:41:57 -04:00
Merge pull request #8804 from ThomasWaldmann/fix-timezone-inconsistency
format_time: output date/time in local tz, fixes #8802
This commit is contained in:
commit
5ea7383d10
1 changed files with 2 additions and 2 deletions
|
|
@ -89,9 +89,9 @@ def safe_timestamp(item_timestamp_ns):
|
|||
|
||||
def format_time(ts: datetime, format_spec=""):
|
||||
"""
|
||||
Convert *ts* to a human-friendly format with textual weekday.
|
||||
Convert *ts* to a human-friendly format with textual weekday (in local timezone).
|
||||
"""
|
||||
return ts.strftime("%a, %Y-%m-%d %H:%M:%S %z" if format_spec == "" else format_spec)
|
||||
return ts.astimezone().strftime("%a, %Y-%m-%d %H:%M:%S %z" if format_spec == "" else format_spec)
|
||||
|
||||
|
||||
def format_timedelta(td):
|
||||
|
|
|
|||
Loading…
Reference in a new issue