Use floor() not rint() when reducing precision of fractional seconds in
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 6 Jul 2009 20:29:23 +0000 (20:29 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 6 Jul 2009 20:29:23 +0000 (20:29 +0000)
commitb14abb1629c668b0be9035d06d16f70f22a106ac
treedc65ccb551a32b3624803ebc60cb6bdbde517ebd
parentf10820bb9e2912fcc27791e71d900e1cf3edfaba
Use floor() not rint() when reducing precision of fractional seconds in
timestamp_trunc, timestamptz_trunc, and interval_trunc().  This change
only affects the float-datetime case; the integer-datetime case already
behaved like truncation instead of rounding.  Per gripe from Mario Splivalo.

This is a pre-existing issue but I'm choosing not to backpatch, because
it's such a corner case and there have not been prior complaints.  The
issue is largely moot anyway given the trend towards integer datetimes.
src/backend/utils/adt/timestamp.c