10x for the replies. We find the problem. It is in our scripts. We use to_char over a date field and then order by this field. So it sort it as text and not as date. I appologize for loosing your time. 10x again.
pgsql-sql by date:
Соглашаюсь с условиями обработки персональных данных