Merge branch 'master' of git+ssh://github.com/adefaria/clearscm
[clearscm.git] / lib / DateUtils.pm
index ef11a89..6c8164f 100644 (file)
@@ -60,7 +60,7 @@ use Time::Local;
 use Display;
 use Utils;
 
-our @EXPORT = qw (
+our @EXPORT = qw(
   Add
   Age
   Compare
@@ -79,6 +79,7 @@ our @EXPORT = qw (
   YMDHMS
   timestamp
   ymdhms
+  MDYHMS2SQLDatetime
 );
 
 my @months = (
@@ -711,6 +712,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