Am 09.08.2013 14:40, schrieb Olaf Radicke:
> Hi!
>
> I missing a now()-Function in the tntdb::Datetime-Class. Is there any 
> workaround
> for the problem?
>
> Best regards
>
> Olaf
Hi,

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.

But the real answer is a little different: use 
tntdb::Datetime::localtime() or tntdb::Datetime::gmtime() to get the 
current time either as localtime or gmt time. Someone convinced me, that 
it might be a good idea.

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

Reply via email to