Fix internal extract(timezone_minute) formulas
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 1 Apr 2021 14:12:53 +0000 (16:12 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 1 Apr 2021 14:12:53 +0000 (16:12 +0200)
commit91e7c903291116bd081abe7d4a058d40a2a06e16
tree64d8c9848e98ffc978064616820f0def79b6cef9
parentdde1a35aee6266dc8105717275335c46cd2b3650
Fix internal extract(timezone_minute) formulas

Through various refactorings over time, the extract(timezone_minute
from time with time zone) and extract(timezone_minute from timestamp
with time zone) implementations ended up with two different but
equally nonsensical formulas by using SECS_PER_MINUTE and
MINS_PER_HOUR interchangeably.  Since those two are of course both the
same number, the formulas do work, but for readability, fix them to be
semantically correct.
src/backend/utils/adt/date.c
src/backend/utils/adt/timestamp.c