Skip to content

Commit 002f24e

Browse files
foxycodedg
authored andcommitted
ResultSet::normalizeRow(): fixed test when Postgre default TZ is not UTC
Postgre returns timestamps with timezone according to timezone currently set for connection. If timezone for connection is not set, it uses default timezone which can differ between systems.
1 parent b574880 commit 002f24e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/Database/ResultSet.normalizeRow.postgre.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ require __DIR__ . '/connect.inc.php'; // create $connection
1515
Nette\Database\Helpers::loadFromFile($connection, __DIR__ . '/files/pgsql-nette_test3.sql');
1616

1717

18+
$connection->query("SET TIMEZONE TO 'UTC'");
19+
1820
$res = $connection->query('SELECT * FROM types');
1921

2022
$row = $res->fetch();

0 commit comments

Comments
 (0)