aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Utils.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/Utils.pm')
-rw-r--r--perllib/Utils.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/perllib/Utils.pm b/perllib/Utils.pm
index 04d973067..27d604a59 100644
--- a/perllib/Utils.pm
+++ b/perllib/Utils.pm
@@ -226,12 +226,7 @@ sub prettify_dt {
$type ||= '';
$type = 'short' if $type eq '1';
- $dt->set_time_zone( FixMyStreet->config('TIME_ZONE') )
- if FixMyStreet->config('TIME_ZONE');
-
- my $now = DateTime->now( time_zone => 'local' );
- $now->set_time_zone( FixMyStreet->config('TIME_ZONE') )
- if FixMyStreet->config('TIME_ZONE');
+ my $now = DateTime->now( time_zone => FixMyStreet->config('TIME_ZONE') || 'local' );
my $tt = '';
$tt = $dt->strftime('%H:%M') unless $type eq 'date';