aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-03-17 15:50:33 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-03-17 15:50:33 -0400
commitd0a585c6997de6aebd5866c9c1791a1badfcee0a (patch)
tree552fa50034ca039c47a412de1bd88a19130bbbdc /src/backend/utils/adt/jsonfuncs.c
parent8ee2e5f78cd7f99d41ddf2c396d83adb6f9df2db (diff)
downloadpostgresql-d0a585c6997de6aebd5866c9c1791a1badfcee0a.tar.gz
postgresql-d0a585c6997de6aebd5866c9c1791a1badfcee0a.zip
Fix assorted breakage in to_char()'s OF format option.
In HEAD, fix incorrect field width for hours part of OF when tm_gmtoff is negative. This was introduced by commit 2d87eedc1d4468d3 as a result of falsely applying a pattern that's correct when + signs are omitted, which is not the case for OF. In 9.4, fix missing abs() call that allowed a sign to be attached to the minutes part of OF. This was fixed in 9.5 by 9b43d73b3f9bef27, but for inscrutable reasons not back-patched. In all three versions, ensure that the sign of tm_gmtoff is correctly reported even when the GMT offset is less than 1 hour. Add regression tests, which evidently we desperately need here. Thomas Munro and Tom Lane, per report from David Fetter
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions