Для вашего сеанса установлен часовой пояс на летнее время, и когда вы переводите время без часового пояса, оно принимает текущее смещение и настраивает его на стандартное время.
Вы можете приводить метки времени / времени с помощьючасовой пояс:
SET TIME Zone 'europe central';
SELECT Cast ('2017-10-13 16:00:01' AS TIMESTAMP(0)) AS a,
Cast(a AS TIME(0)) AS A_time,
a AT LOCAL AS A_local,
Cast(a AS TIME(0)) AT LOCAL AS A_time_local,
Cast ('2019-10-13 16:00:01' AS TIMESTAMP(0) WITH TIME Zone) AS a_TZ,
Cast(a_TZ AS TIME(0) WITH TIME Zone) AS time_TZ;
a A_time A_local A_time_local a_TZ time_TZ
------------------- -------- ------------------------- -------------- ------------------------- --------------
2017-10-13 16:00:01 15:00:01 2017-10-13 16:00:01+02:00 15:00:01+01:00 2019-10-13 16:00:01+02:00 16:00:01+02:00
Или переключите сеанс на фиксированный часовой пояс:
SET TIME Zone 0;
SELECT Cast ('2017-10-13 16:00:01' AS TIMESTAMP(0)) AS a,
Cast(a AS TIME(0)) AS A_time,
a AT LOCAL AS A_TZ,
Cast(a AS TIME(0)) AT LOCAL AS A_timeTZ;
a A_time A_TZ A_timeTZ
------------------- -------- ------------------------- --------------
2017-10-13 16:00:01 16:00:01 2017-10-13 16:00:01+00:00 16:00:01+00:00