mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-07 12:20:31 +01:00
Fix improper display of fractional seconds in interval values
when using --enable-integer-datetimes and a non-ISO datestyle. Ron Mayer
This commit is contained in:
parent
b304b8640b
commit
c15b9a505d
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.118.2.9 2008/06/09 19:34:40 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.118.2.10 2008/10/02 13:48:12 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
|
@ -3940,7 +3940,7 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str)
|
|||
is_before = TRUE;
|
||||
}
|
||||
sprintf(cp, "%s%d.%02d secs", (is_nonzero ? " " : ""),
|
||||
tm->tm_sec, (((int) sec) / 10000));
|
||||
tm->tm_sec, abs((int) rint(sec / 10000.0)));
|
||||
cp += strlen(cp);
|
||||
#else
|
||||
fsec += tm->tm_sec;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user