Opened 17 years ago
Closed 13 years ago
#604 closed Bugs (wontfix)
from_ftime incorrectly processes FILETIME filled with zeros
| Reported by: | nobody | Owned by: | az_sw_dude |
|---|---|---|---|
| Milestone: | Component: | date_time | |
| Version: | None | Severity: | Showstopper |
| Keywords: | Cc: |
Description
using namespace boost::posix_time;
using namespace boost::gregorian;
FILETIME ft;
ZeroMemory( &ft, sizeof( ft ) );
ptime pt = from_ftime<ptime>( ft );
if ( pt.is_special() ) {
// Never fall into this branch!
std::cout << "ERROR";
} else {
// Exception: boost::gregorian::bad_year
std::cout << boost::format("%1%") % pt.date().year();
}
I suppose that when FILETIME is filled with zeroes,
from_ftime() should return not_a_date_time. But it does
not do this.
Change History (2)
comment:2 by , 13 years ago
| Resolution: | None → wontfix |
|---|---|
| Severity: | → Showstopper |
| Status: | assigned → closed |
Zero FILETIME is valid, so there's no reason to convert it to not_a_date_time.
Note:
See TracTickets
for help on using tickets.
