Marat Khairullin <xmm(at)rambler(dot)ru> writes:
> Compare TZ part of date_func function output with param 'month' and other.
> Is it error?
Depends. Do those various dates fall in daylight-savings or standard-time
territory in your timezone? They all look like reasonable candidates
for local midnight to me, if you are in a northern-hemisphere zone that
switches to standard time sometime during October.
regards, tom lane