aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-05-31 18:31:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-05-31 18:31:51 +0000
commit87de80e95a7c5999dfaf4b769502c97cbe56248b (patch)
tree3bd50b67729b185646616a4b03a6ad6111faaf1c /src/tutorial/basics.source
parentd534b9ee9e8fec0b4d295e7450f6654b08490690 (diff)
downloadpostgresql-87de80e95a7c5999dfaf4b769502c97cbe56248b.tar.gz
postgresql-87de80e95a7c5999dfaf4b769502c97cbe56248b.zip
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.
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions