projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1eeec5
)
Fix improper display of fractional seconds in interval values
author
Tom Lane
<
[email protected]
>
Thu, 2 Oct 2008 13:47:56 +0000
(13:47 +0000)
committer
Tom Lane
<
[email protected]
>
Thu, 2 Oct 2008 13:47:56 +0000
(13:47 +0000)
when using --enable-integer-datetimes and a non-ISO datestyle.
Ron Mayer
src/backend/utils/adt/datetime.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/datetime.c
b/src/backend/utils/adt/datetime.c
index 17ec09780c2ac410358deade32eec573c1e4c713..76040129f1a6e9989a0fb3d4d4968489331866a2 100644
(file)
--- a/
src/backend/utils/adt/datetime.c
+++ b/
src/backend/utils/adt/datetime.c
@@
-3995,7
+3995,7
@@
EncodeInterval(struct pg_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;