Boost logo

Boost :

Subject: [boost] DateTime conversion to tm problem?
From: Maciej Sobczak (prog_at_[hidden])
Date: 2009-06-19 03:24:08


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)?


Maciej Sobczak * *

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