PostgreSQL – How to Check if PostgreSQL is Up to Date with DST Rules

postgresqltimestamptimezone

Recently (2019-04-25) brazilian government ended the use of daylight savings time all around the country.

In my current project I rely on PostgreSQL to do timezone conversions and analytics based on time from different time zones and dates.

As far as I am concerned PostgreSQL implements daylight savings and timezones through Olson database.

1) Is PostgreSQL (version 11, for instance) up to date with the new no daylight saving time rule in Brazil?

2) If it is not updated, how can I fix it? Is there any default PostgreSQL patch calendar/schedule in that sense?

Best Answer

Yes, there is a schedule. It's documented here: https://www.postgresql.org/support/versioning/

if need be, security fixes that are released at least once every three months in what we call a "minor release". For more information on the minor release schedule, you can view the minor release roadmap

And the minor release roadmap currently (as of 2019-07-08) shows:

The target date for these releases are, unless otherwise stated, the second Thursday of February, May, August, and November. The current schedule for upcoming releases is:

   * August 8th, 2019
   * November 7th, 2019
   * February 13th, 2020
   * May 14th, 2020

Every minor release will include updated DST rules if necessary.

The last minor release for Postgres 11 was 11.4 on 2019-06-20. I would have assumed that it included the new rules for Brazilian DST, but I can't find any mentioning of that in the release notes as there was e.g. for the 11.3 and 11.2 releases.

So most probably, 11.5 (scheduled for August 8th) will include that.

If you want an authoritative answer from the devs, you should ask that on the Postgres mailing list


Postgres can be compiled in a way that it uses the operating system's time zone data. You can check if your Postgres version was compiled with the --with-system-tzdata option by running pg_config