1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

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.
This commit is contained in:
Peter Eisentraut
2021-04-01 16:12:53 +02:00
parent dde1a35aee
commit 91e7c90329
2 changed files with 2 additions and 2 deletions

View File

@ -4844,7 +4844,7 @@ timestamptz_part(PG_FUNCTION_ARGS)
case DTK_TZ_MINUTE:
result = -tz;
result /= MINS_PER_HOUR;
result /= SECS_PER_MINUTE;
FMODULO(result, dummy, (double) MINS_PER_HOUR);
break;