Fix to always use short time format for standard make_date outputs

This commit is contained in:
iliajie
2023-02-05 03:19:25 +02:00
parent c5df379ff1
commit c94472f020

View File

@@ -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";
}