aboutsummaryrefslogtreecommitdiffstats
path: root/t/utils.t
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2018-05-29 19:37:34 +0200
committerMarius Halden <marius.h@lden.org>2018-05-29 19:37:34 +0200
commit782457d016084c8de04989dbc824a71899f8b41b (patch)
tree56d14e1a988396e43c8693ff3486e40d16962add /t/utils.t
parent140d40e3eab4cb1e7aa9f95cbc24a0f13180b606 (diff)
parent6e2da95bc6a758c0cf070b9ddd51acc769f7acf1 (diff)
Merge tag 'v2.3.1' into fiksgatami-dev
Diffstat (limited to 't/utils.t')
-rw-r--r--t/utils.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/utils.t b/t/utils.t
index f989580c8..aeaf225c7 100644
--- a/t/utils.t
+++ b/t/utils.t
@@ -67,7 +67,9 @@ is Utils::cleanup_text( "This has new\n\n\nlines in it", { allow_multiline => 1
is Utils::prettify_dt(), "[unknown time]";
-my $dt = DateTime->now;
+# Make sure we create the date using the FMS timezone that prettify_dt uses
+# otherwise this can fail if the local timezone is not the same as the FMS one
+my $dt = DateTime->now( time_zone => FixMyStreet->time_zone || FixMyStreet->local_time_zone );
is Utils::prettify_dt($dt), $dt->strftime("%H:%M today");
# Same week test