mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
> In both datetime_trunc() and timespan_trunc() in dt.c,
> the DTK_MICROSEC case is just like the DTK_MILLISEC case. > I think this is wrong and it ought to look like > fsec = rint(fsec * 1000000) / 1000000; > no? Tom Lane.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.71 1999/05/25 16:12:00 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.72 1999/07/08 03:22:46 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1429,7 +1429,7 @@ datetime_trunc(text *units, DateTime *datetime)
|
||||
break;
|
||||
|
||||
case DTK_MICROSEC:
|
||||
fsec = rint(fsec * 1000) / 1000;
|
||||
fsec = rint(fsec * 1000000) / 1000000;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1573,7 +1573,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
|
||||
break;
|
||||
|
||||
case DTK_MICROSEC:
|
||||
fsec = rint(fsec * 1000) / 1000;
|
||||
fsec = rint(fsec * 1000000) / 1000000;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user