summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Util.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 398957b13..7ed20c875 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -426,6 +426,13 @@ sub format_time {
# strptime($date) returns an empty array if $date has an invalid date format.
my @time = strptime($date);
+ unless (scalar @time) {
+ # If an unknown timezone is passed (such as MSK, for Moskow), strptime() is
+ # unable to parse the date. We try again, but we first remove the timezone.
+ $date =~ s/\s+\S+$//;
+ @time = strptime($date);
+ }
+
if (scalar @time) {
# Fix a bug in strptime() where seconds can be undefined in some cases.
$time[0] ||= 0;