Subject: Re: [boost] DateTime conversion to tm problem?
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-06-20 04:29:05
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.
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.