forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc4acbb8
committed
timestamptz_trunc() should only recalculate the timezone when truncating
to DAY precision or coarser; leave the timezone alone when precision isHOUR or less. This avoids surprises for inputs near a DST transitiontime, as per example from Matthew Gabeler-Lee. (The only reason werecalculate at all is so that outputs that are supposed to representdays will come out as local midnight, and that's not relevant for sub-dayprecision.)1 parent5ba04cd commitc4acbb8
1 file changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
2842 | 2842 | | |
2843 | 2843 | | |
2844 | 2844 | | |
| 2845 | + | |
2845 | 2846 | | |
2846 | 2847 | | |
2847 | 2848 | | |
| |||
2872 | 2873 | | |
2873 | 2874 | | |
2874 | 2875 | | |
| 2876 | + | |
2875 | 2877 | | |
2876 | 2878 | | |
2877 | 2879 | | |
| |||
2885 | 2887 | | |
2886 | 2888 | | |
2887 | 2889 | | |
| 2890 | + | |
2888 | 2891 | | |
2889 | 2892 | | |
2890 | 2893 | | |
2891 | 2894 | | |
2892 | 2895 | | |
2893 | 2896 | | |
| 2897 | + | |
2894 | 2898 | | |
2895 | 2899 | | |
2896 | 2900 | | |
| |||
2904 | 2908 | | |
2905 | 2909 | | |
2906 | 2910 | | |
| 2911 | + | |
2907 | 2912 | | |
2908 | 2913 | | |
| 2914 | + | |
2909 | 2915 | | |
2910 | 2916 | | |
| 2917 | + | |
2911 | 2918 | | |
2912 | 2919 | | |
| 2920 | + | |
2913 | 2921 | | |
2914 | 2922 | | |
| 2923 | + | |
| 2924 | + | |
2915 | 2925 | | |
2916 | 2926 | | |
| 2927 | + | |
2917 | 2928 | | |
2918 | 2929 | | |
| 2930 | + | |
2919 | 2931 | | |
2920 | 2932 | | |
2921 | 2933 | | |
| |||
2941 | 2953 | | |
2942 | 2954 | | |
2943 | 2955 | | |
2944 | | - | |
| 2956 | + | |
| 2957 | + | |
2945 | 2958 | | |
2946 | 2959 | | |
2947 | 2960 | | |
| |||
0 commit comments
Comments
(0)