From: Bart (bartmann.nsd_at_[hidden])
Date: 2005-05-12 11:50:42
... snipped ...
> returns a time with 1s off its correct value.
> The reason for this bug is the line with
> that overwrites the second value just a few µs after the call to gettimofday.
> This new second value is used together with the fs value from gettimeofday.
> tv from gettimofday: 12345s/999998 µs
> t from std::time: 12346s
> resulting time: 12346s/999998 µs !!!!
> Question: Why this call to std::time? I commented it out and it worked.
This bug has been fixed in cvs.
We now use a single call to gettimeofday. That result is broken down into
a struct tm using either std::localtime or std::gmtime. We also set the
fractional seconds in the time_type with that same timeval result.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk