Why may I have different results of casting text datetime to timestamptz on my Postgres server?
The first date casts to 03
, but the second one casts to 04
. Why?
I have Postgres 9.6, my config:
datestyle = 'iso, mdy';
timezone = 'W-SU';
lc_time = 'ru_RU.UTF-8'
CodePudding user response:
There must be a daylight savings time change between these two dates, so that in your session time zone (determined by the current setting of the timezone
parameter) a different UTC offset is used.
W-SU
is an alias for Europe/Moscow
, and Moscow changed from daylight savings time in the night from Oct 25 (Saturday) to Oct 26 (Sunday).