Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2002-04-14 02:13:40


On Sunday, April 14, 2002, at 01:54 AM, Jeff Garland wrote:

>> It seems to me that the present implementation of xtime on many
>> platforms
>> relies upon the system's current time - this could change at any
>> point! The
>> system time may be set backwards by the user or forwards by daylight
>> saving'
>> s time, both which may result in code using xtime to receive incorrect
>> time
>> durations.
>>
>> Consider the following...
>>
>> boost::xtime xt;
>> boost::xtime_get(&xt, boost::TIME_UTC);
>
> The TIME_UTC is not subject to DST. Although it still depends on the
> timezone settings of the
> computer staying constant between calls. This is usually a reasonable
> assumption.

For most purposes yes, although I regularly change the timezone on
airplanes.
But I rarely run codes that use boost at that time.

Matthias


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk