Skip to content
Snippets Groups Projects
  • Tom Lane's avatar
    47386fed
    Use floor() not rint() when reducing precision of fractional seconds in · 47386fed
    Tom Lane authored
    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.
    47386fed
    History
    Use floor() not rint() when reducing precision of fractional seconds in
    Tom Lane authored
    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.