[date-time] bug determining system time

Hello, we just found an error inside the date-time library. I use "boost::posix_time::microsec_clock::local_time()" to get the actual time. When the microseconds overflow and a new second starts, the seconds don't get incremented atomically together with the microseconds. Is this a known bug? My System: boost version 1.31.0 Linux 2.6.3, SMP (Red Hat Enterprise) 2x Intel Xeon HT Some values of consecutive calls: call: 2005-Jun-28 15:00:24.978706 call: 2005-Jun-28 15:00:24.989132 FAILURE: 2005-Jun-28 15:00:24.000105 FAILURE: 2005-Jun-28 15:00:24.000210 FAILURE: 2005-Jun-28 15:00:24.000283 FAILURE: 2005-Jun-28 15:00:24.000353 FAILURE: 2005-Jun-28 15:00:24.000424 call: 2005-Jun-28 15:00:25.000503 call: 2005-Jun-28 15:00:25.010122 call: 2005-Jun-28 15:00:25.020088 call: 2005-Jun-28 15:00:25.030194 Regards, Harald -- Harald Haspl apus | Software GmbH Bahnhofstrasse 1, A-8074 Graz-Raaba T | +43 316 401629 0 F | +43 316 401629 9 http://www.apus.co.at harald.haspl@apus.co.at

On Tue, 28 Jun 2005 18:53:44 +0200, Harald Haspl wrote
Hello,
we just found an error inside the date-time library.
I use "boost::posix_time::microsec_clock::local_time()" to get the actual time. When the microseconds overflow and a new second starts, the seconds don't get incremented atomically together with the microseconds.
Is this a known bug?
My System: boost version 1.31.0 Linux 2.6.3, SMP (Red Hat Enterprise) 2x Intel Xeon HT
Hi Harald -- yes this is a known bug. The fix is in the current CVS version and will be in release 1.33. Jeff
participants (2)
-
Harald Haspl
-
Jeff Garland