Am 09.08.2013 20:07, schrieb Olaf Radicke: > >> Tommi Mäkitalo <[email protected]> hat am 9. August 2013 um 18:28 geschrieben: > [...] >> I wanted to answer no, there is no workaround. The tntdb::Datetime class >> should be just a data object for converting database specific datetime >> values to something, a C++ program can understand. And hence the >> tntdb::Datetime class should not be used for other purposes. It has no >> range checks or other features, a full fledged datetime class should >> have since tntdb is a database access library. You should use other >> datetime classes for real datetimes. cxxtools::Datetime is a good >> starting point. And if you include <tntdb/cxxtools/datetime.h> you can >> use it just like tntdb::Datetime. > why not use tntdb the cxxtools::DateTime type? > http://www.tntnet.org/apidoc/html/classtntdb_1_1_datetime.html > looks very similar to > http://www.tntnet.org/apidoc/html/classcxxtools_1_1_date_time.html > > CU > > Olaf > > > -------------------|-------------------|-------------------|-------------------| It is just not meant to be used as a datetime class. It is just an interface to the database.
Try to create a tntdb::Datetime(2013, 5, 32, 0, 0, 0). It will work. While cxxtools::DateTime(2013, 5, 32, 0, 0, 0) will throw an exception. That is also documented in the tntdb documentation (http://www.tntnet.org/howto/tntdb.html). Tommi ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
