diff options
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r-- | Bugzilla/Util.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 951c4df3c..3573ad148 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -444,6 +444,9 @@ sub format_time { my @time = strptime($date); if (scalar @time) { + # Fix a bug in strptime() where seconds can be undefined in some cases. + $time[0] ||= 0; + # strptime() counts years from 1900, and months from 0 (January). # We have to fix both values. my $dt = DateTime->new({year => 1900 + $time[5], |