
20 Jun
2009
20 Jun
'09
8:29 a.m.
Maciej Sobczak wrote:
Hi,
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.
Which boost version do you use? In the current trunk version I see that posix_time::to_tm(ptime) calls gregorian::to_tm to initialize date portion of the tm structure. Or were you referring to posix_time::to_tm(time_duration)? If so then the comment explicitly says that the resulting tm structure has zeroed date portion. Considering that the original argument is duration, I think the function behavior is correct.