diff options
| author | Bruce Momjian <bruce@momjian.us> | 2005-05-26 03:48:25 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2005-05-26 03:48:25 +0000 |
| commit | 4c862b18f977bbf7557cbf5a668c68f6f81734c0 (patch) | |
| tree | ba7a9bc54e22f0347ee539b4c190054c7e9fb250 /src/interfaces | |
| parent | b3195dae49b08ea2271a706f55068896322f1641 (diff) | |
Display only 9 not 10 digits of precision for timestamp values when
using non-integer timestamps. This prevents the display of rounding
errors for common values like days < 32.
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/ecpg/pgtypeslib/interval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c index 2e644f14c19..5e229f64cc1 100644 --- a/src/interfaces/ecpg/pgtypeslib/interval.c +++ b/src/interfaces/ecpg/pgtypeslib/interval.c @@ -511,7 +511,7 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str) sprintf(cp, ".%06d", (fsec >= 0) ? fsec : -(fsec)); #else fsec += tm->tm_sec; - sprintf(cp, ":%013.10f", fabs(fsec)); + sprintf(cp, ":%012.9f", fabs(fsec)); #endif TrimTrailingZeros(cp); cp += strlen(cp); |
