database
database copied to clipboard
ResultSet->normalizeRow ignores timezones
https://github.com/nette/database/blob/4b4a269d2b92d8fc922230996889128948a5e346/src/Database/ResultSet.php#L167
Tested for PostgreSQL's timestamp with time zone data type. This line seems to throw out timezone, when it is present. 2014-10-27 18:05:00 +0100 gets converted to 2014-10-27 18:05:00 with timezone specified in config date.timezone.
Something like $row[$key] = Nette\Utils\DateTime::from(strtotime($value)); works, but is not very nice. I would like to know if a) this is a bug or I am doing something wrong, and b) possible solutions?
Timestamp with timezone is not covered by test. U guess, noone used it.
One possible solution is fixing normalization :)