forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit21aac2f
committed
Remove support for timezone "posixrules" file.
The IANA tzcode library has a feature to read a time zone file named"posixrules" and apply the daylight-savings transition dates and timestherein, when it is given a POSIX-style time zone specification thatlacks an explicit transition rule. However, there's a problem withthat code: it doesn't work for dates past the Y2038 time_t rollover.(Effectively, all times beyond that point are treated as standardtime.) The IANA crew regard this feature as legacy, so their plan isto remove it not fix it. The time frame in which that will happenis unclear, but presumably it'll happen well before 2038.Moreover, effective with the next IANA data update (probably thisfall), the recommended default will be to not install a "posixrules"file in the first place. The time frame in which tzdata packagersmight adopt that suggestion is likewise unclear, but at least someplatforms will probably do it in the next year or so. While we couldignore that recommendation so far as PG-supplied tzdata trees areconcerned, builds using --with-system-tzdata will be subject towhatever the platform's tzdata packager decides to do.Thus, whether or not we do anything, some increasing fraction ofPostgres users will be exposed to the behavior observed when thereis no "posixrules" file; and if we do nothing, we'll have essentiallyno control over the timing of that change.The best thing to do to ameliorate the uncertainty seems to be toproactively remove the posixrules-reading feature. If we do that ina scheduled release then at least we can release-note the behavioralchange, rather than having users be surprised by it after a routinetzdata update.The change in question is fairly minor anyway: to be affected,you have to be using a POSIX-style timezone spec, it has to nothave an explicit rule, and it has to not be one of the four traditionalcontinental-USA zone names (EST5EDT, CST6CDT, MST7MDT, or PST8PDT),as those are special-cased. Since the default "posixrules" fileprovides USA DST rules, the number of people who are likely to findsuch a zone spec useful is probably quite small. Moreover, thefallback behavior with no explicit rule and no "posixrules" file is toapply current USA rules, so the only thing that really breaks is theDST transitions in years before 2007 (and you get the countervailingfix that transitions after 2038 will be applied).Now, some installations might have replaced the "posixrules" file,allowing e.g. EU rules to be applied to a POSIX-style timezone spec.That won't work anymore. But it's not exactly clear why this solutionwould be preferable to using a regular named zone. In any case, giventhe Y2038 issue, we need to be pushing users to stop depending on this.Back-patch into v13; it hasn't been released yet, so it seems OK tochange its behavior. (Personally I think we ought to back-patchfurther, but I've been outvoted.)Discussion:https://postgr.es/m/1390.1562258309@sss.pgh.pa.usDiscussion:https://postgr.es/m/20200621211855.6211-1-eggert@cs.ucla.edu1 parentb86be84 commit21aac2f
File tree
5 files changed
+18
-89
lines changed- doc/src/sgml
- src
- timezone
- tools/msvc
5 files changed
+18
-89
lines changedLines changed: 3 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
718 | 718 |
| |
719 | 719 |
| |
720 | 720 |
| |
721 |
| - | |
722 |
| - | |
723 |
| - | |
724 |
| - | |
725 |
| - | |
726 |
| - | |
727 |
| - | |
728 |
| - | |
729 |
| - | |
730 |
| - | |
731 |
| - | |
732 |
| - | |
733 |
| - | |
734 |
| - | |
735 |
| - | |
736 |
| - | |
737 |
| - | |
738 |
| - | |
739 |
| - | |
740 |
| - | |
741 |
| - | |
742 |
| - | |
743 | 721 |
| |
744 | 722 |
| |
745 | 723 |
| |
746 | 724 |
| |
747 |
| - | |
| 725 | + | |
| 726 | + | |
748 | 727 |
| |
749 | 728 |
| |
750 | 729 |
| |
| |||
765 | 744 |
| |
766 | 745 |
| |
767 | 746 |
| |
768 |
| - | |
769 |
| - | |
| 747 | + | |
770 | 748 |
| |
771 | 749 |
| |
772 | 750 |
| |
|
Lines changed: 2 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 | 32 |
| |
37 | 33 |
| |
38 | 34 |
| |
| |||
60 | 56 |
| |
61 | 57 |
| |
62 | 58 |
| |
63 |
| - | |
| 59 | + | |
64 | 60 |
| |
65 | 61 |
| |
66 | 62 |
| |
67 | 63 |
| |
68 | 64 |
| |
69 |
| - | |
| 65 | + | |
70 | 66 |
| |
71 | 67 |
| |
72 | 68 |
| |
|
Lines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
| 96 | + | |
100 | 97 |
| |
101 | 98 |
| |
102 | 99 |
| |
|
Lines changed: 11 additions & 47 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
61 |
| - | |
62 |
| - | |
63 |
| - | |
| 56 | + | |
64 | 57 |
| |
65 | 58 |
| |
66 | 59 |
| |
| |||
986 | 979 |
| |
987 | 980 |
| |
988 | 981 |
| |
989 |
| - | |
990 |
| - | |
991 |
| - | |
992 |
| - | |
993 |
| - | |
994 |
| - | |
995 |
| - | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
996 | 989 |
| |
| 990 | + | |
997 | 991 |
| |
998 | 992 |
| |
999 | 993 |
| |
| |||
1027 | 1021 |
| |
1028 | 1022 |
| |
1029 | 1023 |
| |
1030 |
| - | |
1031 |
| - | |
1032 |
| - | |
1033 |
| - | |
1034 |
| - | |
1035 |
| - | |
1036 |
| - | |
1037 |
| - | |
1038 |
| - | |
1039 |
| - | |
1040 |
| - | |
1041 |
| - | |
1042 |
| - | |
1043 |
| - | |
1044 |
| - | |
1045 |
| - | |
1046 |
| - | |
1047 |
| - | |
1048 |
| - | |
1049 |
| - | |
1050 |
| - | |
1051 |
| - | |
1052 |
| - | |
1053 |
| - | |
1054 |
| - | |
1055 |
| - | |
1056 |
| - | |
1057 |
| - | |
1058 |
| - | |
1059 |
| - | |
1060 |
| - | |
1061 |
| - | |
| 1024 | + | |
| 1025 | + | |
1062 | 1026 |
| |
1063 | 1027 |
| |
1064 | 1028 |
| |
|
Lines changed: 1 addition & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
366 | 366 |
| |
367 | 367 |
| |
368 | 368 |
| |
369 |
| - | |
370 |
| - | |
371 |
| - | |
372 |
| - | |
373 |
| - | |
374 | 369 |
| |
375 | 370 |
| |
376 | 371 |
| |
377 |
| - | |
378 |
| - | |
| 372 | + | |
379 | 373 |
| |
380 | 374 |
| |
381 | 375 |
| |
|
0 commit comments
Comments
(0)