From c94472f020bb4e2091c647aad11a63141561fd3d Mon Sep 17 00:00:00 2001 From: iliajie Date: Sun, 5 Feb 2023 03:19:25 +0200 Subject: [PATCH] Fix to always use short time format for standard `make_date` outputs --- web-lib-funcs.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index d9f1fcff0..831363cc3 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -2074,10 +2074,8 @@ if (!ref($only) && $only) { } else { my $date_format_time = DateTime->from_epoch(locale => $locale_name, epoch => $secs, time_zone => $tz)->strftime($locale_format_time); - if ($timeshort) { - $date_format_time = $date_format_time; - $date_format_time =~ s/(\d+):(\d+):(\d+)(.*?)/$1:$2$4/; - } + $date_format_time = $date_format_time; + $date_format_time =~ s/(\d+):(\d+):(\d+)(.*?)/$1:$2$4/; $date_format_time =~ s/\s/ /g; return "$date_format_short $date_format_time"; }