From: Jan E. <je...@in...> - 2014-01-05 14:01:47
|
I have a 2-patch here which I would like to share before merging. SQL databases such as Mysql support dates from 1000-01-01 to 9999-01-01. However, even "reasonable" dates like 1968-02-14 cannot be reliably retrieved through libdbi. The root problem is that time_t only starts at 1970, and MSVCRT outright refuses to transform a struct tm into an epochtime if it is before 1970 - and that is even within the specification. How I solve this: make the struct tm available. It is a bit of a cut into the dbi API, but hopefully done right. |