00001 #ifndef ZTT_DCS_TIMESTAMP_HPP
00002 #define ZTT_DCS_TIMESTAMP_HPP
00003
00004 #include <time.h>
00005 #include "fee_loglevels.h"
00006
00007 namespace ztt { namespace dcs {
00017 struct Timestamp {
00022 Timestamp() {
00023 time_t timeVal;
00024 struct tm* now;
00025
00026 time(&timeVal);
00027 now = localtime(&timeVal);
00028
00029 int length = strftime(date, Msg_Date_Size, "%Y-%m-%d %H:%M:%S", now);
00030
00031 date[length] = 0;
00032 }
00033
00037 ~Timestamp() {
00038 }
00039
00043 char date[Msg_Date_Size];
00044
00045 };
00046
00047
00048 } }
00049
00050 #endif