aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/User/Setting/Timezone.pm')
-rw-r--r--Bugzilla/User/Setting/Timezone.pm22
1 files changed, 12 insertions, 10 deletions
diff --git a/Bugzilla/User/Setting/Timezone.pm b/Bugzilla/User/Setting/Timezone.pm
index 8959d1dda..b6b2503b5 100644
--- a/Bugzilla/User/Setting/Timezone.pm
+++ b/Bugzilla/User/Setting/Timezone.pm
@@ -18,19 +18,21 @@ use parent qw(Bugzilla::User::Setting);
use Bugzilla::Constants;
sub legal_values {
- my ($self) = @_;
+ my ($self) = @_;
- return $self->{'legal_values'} if defined $self->{'legal_values'};
+ return $self->{'legal_values'} if defined $self->{'legal_values'};
- my @timezones = DateTime::TimeZone->all_names;
- # Remove old formats, such as CST6CDT, EST, EST5EDT.
- @timezones = grep { $_ =~ m#.+/.+#} @timezones;
- # Append 'local' to the list, which will use the timezone
- # given by the server.
- push(@timezones, 'local');
- push(@timezones, 'UTC');
+ my @timezones = DateTime::TimeZone->all_names;
- return $self->{'legal_values'} = \@timezones;
+ # Remove old formats, such as CST6CDT, EST, EST5EDT.
+ @timezones = grep { $_ =~ m#.+/.+# } @timezones;
+
+ # Append 'local' to the list, which will use the timezone
+ # given by the server.
+ push(@timezones, 'local');
+ push(@timezones, 'UTC');
+
+ return $self->{'legal_values'} = \@timezones;
}
1;