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