From: Andrew DeFaria Date: Mon, 13 Jun 2016 19:15:42 +0000 (-0700) Subject: Fixed FormatTime to properly fill in leading zeros when hours are less X-Git-Url: https://defaria.com/gitweb/?a=commitdiff_plain;h=7d203657c0d231c93825b9b5497bd6ca0c450e01;p=clearscm.git Fixed FormatTime to properly fill in leading zeros when hours are less than 12 --- 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