Boost logo

Boost :

Subject: Re: [boost] DateTime conversion to tm problem?
From: Ilya Bobir (ilya.bobir_at_[hidden])
Date: 2009-06-20 13:40:53

Maciej Sobczak wrote:
> The posix_time::to_tm function clears the date fields of the std::tm
> structure. Having zeros on year, month and day fields represent the
> 1900-01-00 date according to the std::tm conventions, which is a date
> that did not exist. Using such value with other APIs might result in out
> of range conditions.
> Is it considered to be a problem? What about setting tm_mday to 1
> instead (which would represent 1900-01-01 - that is, the first legal date)?

Maybe if you show a use case your proposal will get more weight?

Are there any use cases that will become invalid if the tm_mday will be
set to 1?

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