1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
11 #include <anna/dbms/TimeStamp.hpp>
13 #include <anna/config/defines.hpp>
14 #include <anna/core/functions.hpp>
18 using namespace anna::dbms;
20 const char* dbms::TimeStamp::getCStringValue() const
24 if((format = a_format) == NULL)
25 format = "%d/%m/%Y %H:%M:%S.%%d";
27 TimeStamp* _this = const_cast <TimeStamp*>(this);
28 char* result = _this->a_buffer;
30 if(strftime(result, MaxDateSize, format, &a_value) == 0)
33 if(anna_strstr(result, "%d")) {
34 anna_strcpy(_this->a_anotherBuffer, result);
35 sprintf(result, _this->a_anotherBuffer, a_fractionalSecond);