project64/Source/Common/DateTimeClass.cpp

16 lines
294 B
C++
Raw Normal View History

2016-02-24 06:59:29 +00:00
#include "stdafx.h"
#include "DateTimeClass.h"
#include <time.h>
CDateTime::CDateTime()
{
m_time = time(NULL);
2016-02-24 06:59:29 +00:00
}
std::string CDateTime::Format(const char * format)
2016-02-24 06:59:29 +00:00
{
char buffer[100];
strftime(buffer, sizeof(buffer), format, localtime(&m_time));
2016-02-24 06:59:29 +00:00
return std::string(buffer);
}