summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Util.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 4d702f02e..1471295fc 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -476,8 +476,8 @@ sub validate_time {
my $ts = str2time($time);
if ($ts) {
$time2 = time2str("%H:%M:%S", $ts);
- if (trim($time) =~ /^\d\d:\d\d$/) {
- $time .= ':00';
+ if ($time =~ /^(\d{1,2}):(\d\d)(?::(\d\d))?$/) {
+ $time = sprintf("%02d:%02d:%02d", $1, $2, $3 || 0);
}
}
my $ret = ($ts && $time eq $time2);