Fix code to check legal dates *before* calling localtime() to get the
Thomas G. Lockhart <lockhart@fourpalms.org>
Fix code to check legal dates *before* calling localtime() to get the time zone. Previously, localtime() rotated a date with a day of month field which exceeded the actual range into the next months, masking the fact that a bad date had been specified. Regression tests pass.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/datetime.c | modified | +3 −33 |
| src/backend/utils/adt/dt.c | modified | +40 −90 |