From 470598af243b9255e1115f861ee6206aaf3022fe Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Mon, 13 Jun 2016 12:15:42 -0700 Subject: [PATCH] Fixed FormatTime to properly fill in leading zeros when hours are less than 12 --- lib/DateUtils.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/DateUtils.pm b/lib/DateUtils.pm index ef11a89..f106394 100644 --- a/lib/DateUtils.pm +++ b/lib/DateUtils.pm @@ -711,6 +711,8 @@ Returns: my $AmPm = $hours > 12 ? "Pm" : "Am"; $hours = $hours - 12 if $hours > 12; + + $hours = "0$hours" if length $hours == 1; return "$hours:$minutes $AmPm"; } # FormatTime -- 2.17.1