forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbc10219
committed
Make pg_interpret_timezone_abbrev() check sp->defaulttype too.
This omission caused it to not recognize the furthest-back zoneabbreviation when working with timezone data compiled with relativelyrecent zic (2018f or newer). Older versions of zic produced a dummyDST transition at the Big Bang, so that the oldest abbreviation couldalways be found in the sp->types[] array; but newer versions don't dothat, so that we must examine defaulttype as well as the types[] arrayto be sure of seeing all the abbreviations.While this has been broken for six or so years, we'd managed notto notice for two reasons: (1) many platforms are still usingancient zic for compatibility reasons, so that the issue did notmanifest in builds using --with-system-tzdata; (2) the oldestzone abbreviation is almost always "LMT", which we weren'tsupporting anyway (but an upcoming patch will accept that).While at it, update pg_next_dst_boundary() to use sp->defaulttypeas the time type for non-DST zones and times before the oldestDST transition. The existing code there predates upstream'sinvention of the sp->defaulttype field, and its heuristic forfinding the oldest time type has now been subsumed into thecode that sets sp->defaulttype.Possibly this should be back-patched, but I'm not currently awareof any visible consequences of this bug in released branches.Per report from Aleksander Alekseev and additional investigation.Discussion:https://postgr.es/m/CAJ7c6TOATjJqvhnYsui0=CO5XFMF4dvTGH+skzB--jNhqSQu5g@mail.gmail.com1 parent901bd4a commitbc10219
1 file changed
+20
-20
lines changedLines changed: 20 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1624 | 1624 |
| |
1625 | 1625 |
| |
1626 | 1626 |
| |
1627 |
| - | |
1628 |
| - | |
1629 |
| - | |
1630 |
| - | |
1631 |
| - | |
1632 |
| - | |
1633 |
| - | |
1634 |
| - | |
1635 |
| - | |
| 1627 | + | |
| 1628 | + | |
1636 | 1629 |
| |
1637 | 1630 |
| |
1638 | 1631 |
| |
| |||
1692 | 1685 |
| |
1693 | 1686 |
| |
1694 | 1687 |
| |
1695 |
| - | |
1696 |
| - | |
1697 |
| - | |
1698 |
| - | |
1699 |
| - | |
1700 |
| - | |
1701 |
| - | |
1702 |
| - | |
1703 |
| - | |
| 1688 | + | |
| 1689 | + | |
1704 | 1690 |
| |
1705 | 1691 |
| |
1706 | 1692 |
| |
| |||
1793 | 1779 |
| |
1794 | 1780 |
| |
1795 | 1781 |
| |
1796 |
| - | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
1797 | 1785 |
| |
1798 | 1786 |
| |
1799 | 1787 |
| |
| |||
1827 | 1815 |
| |
1828 | 1816 |
| |
1829 | 1817 |
| |
1830 |
| - | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
1831 | 1831 |
| |
1832 | 1832 |
| |
1833 | 1833 |
| |
|
0 commit comments
Comments
(0)