1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00
Files
postgres/src
Tom Lane a757fd70e5 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.
2004-05-31 18:32:23 +00:00
..
2004-05-26 18:27:23 +00:00
2003-10-27 07:42:34 +00:00
2002-09-05 18:28:46 +00:00