Skip to content

Commit

Permalink
core: Explicitly set the timezone of the db connection to UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
mmzeeman committed Jan 31, 2017
1 parent 2a42716 commit 4a45cea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db/z_db_pgsql.erl
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ connect(Args, RetryCt) ->
case pgsql:connect(Hostname, Username, Password,
[{database, Database}, {port, Port}]) of
{ok, Conn} ->
case pgsql:squery(Conn, "SET search_path TO " ++ Schema) of
{ok, [], []} ->
case pgsql:squery(Conn, "SET TIME ZONE 'UTC'; SET search_path TO " ++ Schema) of
[{ok, [], []}, {ok, [],[]}] ->
{ok, Conn};
Error ->
catch pgsql:close(Conn),
Expand Down

0 comments on commit 4a45cea

Please sign in to comment.