# HG changeset patch # User Goffi # Date 1619886973 -7200 # Node ID b258dce27d6d30ec4d9c3d3c3a3954ccb9199dcb # Parent 8508fab9bcc29417bc60dbffad49c0ddb4b307df tools (common/date_utils): fix `date_only` for `short`, `long` and `full` format diff -r 8508fab9bcc2 -r b258dce27d6d sat/tools/common/date_utils.py --- a/sat/tools/common/date_utils.py Sat May 01 18:30:01 2021 +0200 +++ b/sat/tools/common/date_utils.py Sat May 01 18:36:13 2021 +0200 @@ -150,9 +150,9 @@ return dates.format_timedelta( delta, granularity="minute", add_direction=True, locale=locale_str ) - elif fmt in ("short", "long"): + elif fmt in ("short", "long", "full"): if date_only: - dt = datetime.fromtimestamp(timestamp, tz_info) + dt = datetime.datetime.fromtimestamp(timestamp, tz_info) return dates.format_date(dt, format=fmt, locale=locale_str) else: return dates.format_datetime(timestamp, format=fmt, locale=locale_str,