Boost logo

Boost :

Subject: Re: [boost] [gsoc 13] Questions regarding Boost::chrono and as well as Boost::chrono/date
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2013-05-01 05:02:56

On Apr 30, 2013, at 3:14 PM, Anurag Kalia <anurag.kalia_at_[hidden]> wrote:

> Are timezones other than utc and local important? Unix, Boost.date_time and Boost.chrono seem to support
> these two timezones only. What are the motivations to restrict timezones to these two instances? They seem to be the minimum possible set required to display time. I am still reading up on this stuff, so probably a little more reading will answer this part.

Time zones are important. UTC and local are critical. Being able to manipulate dates in additional time zones, other than UTC, is very helpful. Consider a multinational corporation consolidating information from multiple sites. Where the program runs dictates the local time zone, which might be used for logging timestamps. The data's source dictates the time zone of time stamps in the data. Neither time zone need be UTC. One could switch the local time zone to that of the data, convert each date/time to UTC, switch local back to its original value, and then use UTC only with the data, but during the switch, the log time stamps would be wrong.

One of the flaws in Boost.Datetime is the time zone support only accounts for two changes per year: DST on and off. However, other changes can be legislated any given year. Another deficiency you might consider addressing is multi-year time zone support. That is, based upon the date/time being represented, which time zone rules apply?

Know that you cannot please all interested parties with a single date/time class. Special cases often require special purpose classes and need not, necessarily, be standardized. Look to other programming languages and libraries for inspiration and scope.


(Sent from my portable computation engine)

Boost list run by bdawes at, gregod at, cpdaniel at, john at