|
Boost : |
Subject: [boost] DateTime conversion to tm problem?
From: Maciej Sobczak (prog_at_[hidden])
Date: 2009-06-19 03:24:08
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. 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)?
Regards,
-- Maciej Sobczak * www.msobczak.com * www.inspirel.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk