- Notifications
You must be signed in to change notification settings - Fork28
Commitc62b8ea
committed
Fix edge-case behavior of pg_next_dst_boundary().
Due to rather sloppy thinking (on my part, I'm afraid) about theappropriate behavior for boundary conditions, pg_next_dst_boundary() gaveundefined, platform-dependent results when the input time is exactly thelast recorded DST transition time for the specified time zone, as a resultof fetching values one past the end of its data arrays.Change its specification to be that it always finds the next DST boundary*after* the input time, and adjust code to match that. The sole existingcaller, DetermineTimeZoneOffset, doesn't actually care about thisdistinction, since it always uses a probe time earlier than the instantthat it does care about. So it seemed best to me to change the API to makethe result=1 and result=0 cases more consistent, specifically to ensurethat the "before" outputs always describe the state at the given time,rather than hacking the code to obey the previous API comment exactly.Per bug #6605 from Sergey Burladyan. Back-patch to all supported versions.1 parentca1e1a8 commitc62b8ea
1 file changed
+12
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
1295 | | - | |
| 1295 | + | |
1296 | 1296 | | |
1297 | 1297 | | |
1298 | 1298 | | |
1299 | 1299 | | |
1300 | | - | |
| 1300 | + | |
1301 | 1301 | | |
1302 | | - | |
1303 | | - | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
1304 | 1305 | | |
1305 | | - | |
| 1306 | + | |
1306 | 1307 | | |
1307 | 1308 | | |
1308 | | - | |
| 1309 | + | |
1309 | 1310 | | |
1310 | 1311 | | |
1311 | 1312 | | |
| |||
1385 | 1386 | | |
1386 | 1387 | | |
1387 | 1388 | | |
1388 | | - | |
| 1389 | + | |
1389 | 1390 | | |
1390 | | - | |
| 1391 | + | |
1391 | 1392 | | |
1392 | 1393 | | |
1393 | 1394 | | |
1394 | 1395 | | |
1395 | 1396 | | |
1396 | 1397 | | |
1397 | | - | |
| 1398 | + | |
1398 | 1399 | | |
1399 | 1400 | | |
1400 | 1401 | | |
| |||
1415 | 1416 | | |
1416 | 1417 | | |
1417 | 1418 | | |
1418 | | - | |
| 1419 | + | |
1419 | 1420 | | |
1420 | 1421 | | |
1421 | | - | |
| 1422 | + | |
1422 | 1423 | | |
1423 | 1424 | | |
1424 | 1425 | | |
| |||
0 commit comments
Comments
(0)