Re: [Cppcms-users] How to store/manipulate dates?
Brought to you by:
artyom-beilis
From: <ele...@ex...> - 2012-02-06 05:31:21
|
A little update, using just <ctime>, by fetching the timestamp as std::tm and then converting it to time_t works. However, I noticed another issue. struct topic{ topic() : id(0) {} std::string title; std::string body; booster::locale::date_time created_at; int id; }; Using date_time hits exception - std::bad_cast. I've actually removed every reference to created_at in the code and it seems that by merely including in the struct, it causes the server to error 500. The struct gets copied into a vector that holds all the topics. I assume this is a bug. Petr > Hi, > > Essentially my problem is this - I need to load timestamp from a database > table, what data type should I use to store it? (I see > booster::locale::date_time, is that it?) > > Cheers, > Petr Janda > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |