I think I've finally identified the cause of the off-by-one-second
issue in timestamp conversion that we hacked around for so long by
ignoring the seconds field from localtime(). It's simple: you have
to watch out for platform-specific roundoff error when reducing a
possibly-fractional timestamp to integral time_t form. In particular
we should subtract off the already-determined fractional fsec field.
This should be enough to get an exact answer with int64 timestamps;
with float timestamps, throw in a rint() call just to be sure.
timestamp.c (r1.96 -> r22.214.171.124)
pgsql-committers by date
|Next:||From: Tom Lane||Date: 2004-05-31 18:42:41|
|Subject: pgsql-server: Too few parens for my taste in this macro.|
|Previous:||From: Tom Lane||Date: 2004-05-31 18:31:51|
|Subject: pgsql-server: I think I've finally identified the cause of the |