1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

Fix (hopefully for the last time) problems with datetime values displaying

like '23:59:60' because of fractional-second roundoff problems.  Trying
to control this upstream of the actual display code was hopeless; the right
way is to explicitly round fractional seconds in the display code and then
refigure the results if the fraction rounds up to 1.  Per bug #1927.
This commit is contained in:
Tom Lane
2005-10-09 17:21:47 +00:00
parent 7754f7634c
commit 313ed1ed94
10 changed files with 132 additions and 63 deletions

View File

@ -122,9 +122,7 @@ tstz_to_ts_gmt(Timestamp *gmt, TimestampTz *ts)
*gmt -= (tz * INT64CONST(1000000));
#else
*gmt -= tz;
*gmt = JROUND(*gmt);
#endif
}
return gmt;
}