diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet.pm | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d23557fc..407656364 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Truncate dates in Open311 output to the second. #2023 - Fix check for visible sub map links after 'Try again'. - Stop race condition when making a new report quickly. + - Set a session timezone in case database server is set differently. - Admin improvements: - Inspectors can set non_public status of reports. #1992 - Default start date is shown on the dashboard. diff --git a/perllib/FixMyStreet.pm b/perllib/FixMyStreet.pm index b30f59472..c8d22fe50 100644 --- a/perllib/FixMyStreet.pm +++ b/perllib/FixMyStreet.pm @@ -154,7 +154,12 @@ sub dbic_connect_info { AutoCommit => 1, pg_enable_utf8 => 1, }; - my $dbic_args = {}; + my $local_time_zone = local_time_zone(); + my $dbic_args = { + on_connect_do => [ + "SET TIME ZONE '" . $local_time_zone->name . "'", + ], + }; return ( $dsn, $user, $password, $dbi_args, $dbic_args ); } |