diff options
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Alert.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Alert.pm | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Alert.pm b/perllib/FixMyStreet/DB/Result/Alert.pm index 4ce72f873..c64cb2ff4 100644 --- a/perllib/FixMyStreet/DB/Result/Alert.pm +++ b/perllib/FixMyStreet/DB/Result/Alert.pm @@ -69,24 +69,16 @@ __PACKAGE__->belongs_to( # You can replace this text with custom code or comments, and it will be preserved on regeneration -use DateTime::TimeZone; use Moose; use namespace::clean -except => [ 'meta' ]; with 'FixMyStreet::Roles::Abuser'; -my $tz = DateTime::TimeZone->new( name => "local" ); - -my $tz_f; -$tz_f = DateTime::TimeZone->new( name => FixMyStreet->config('TIME_ZONE') ) - if FixMyStreet->config('TIME_ZONE'); - my $stz = sub { my ( $orig, $self ) = ( shift, shift ); my $s = $self->$orig(@_); return $s unless $s && UNIVERSAL::isa($s, "DateTime"); - $s->set_time_zone($tz); - $s->set_time_zone($tz_f) if $tz_f; + FixMyStreet->set_time_zone($s); return $s; }; |