From: Mike R. <mry...@gm...> - 2014-01-06 14:57:37
|
While I can certainly understand the desire to improve handling of dates and times in libdbi (I helped a bit with the timezone code a few years back), I think breaking the API for all current applications is a bit heavy handed. How about a parallel API for grabbing the struct instead? That way you get what you need, and application authors have a migration path that allows them to benefit from bug fixes in other areas while they change their apps to use the struct instead, if their code would benefit from that. TIA, On Sun, Jan 5, 2014 at 8:43 AM, Jan Engelhardt <je...@in...> wrote: > > 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. > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > libdbi-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libdbi-devel -- Mike Rylander | Director of Research and Development | Equinox Software, Inc. / Your Library's Guide to Open Source | phone: 1-877-OPEN-ILS (673-6457) | email: mi...@es... | web: http://www.esilibrary.com |