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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user