
20 Jun
2009
20 Jun
'09
5:40 p.m.
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?