Newer
Older
Import / projects / Gameloft / glwebtools / include / glwebtools / os / glwebtools_time.h
@John John on 29 Dec 2020 670 bytes bulk import from macbookpro checkouts
#pragma once
#ifndef _GLWEBTOOLS_TIME_INCLUDED_
#define _GLWEBTOOLS_TIME_INCLUDED_

#include <time.h>
#include <glwebtools/glwebtools_error.h>

namespace glwebtools
{

class Time
{
public:
	static time_t GetCurrentTimestamp();

	static glwebtools::Error ConvertISOTimeUTCToTimestamp(const char* timeStr, time_t& result);
	static glwebtools::Error ConvertRFC1123ToTimestamp(const char* timeStr, time_t& result);
	static glwebtools::Error ConvertRFC1036ToTimestamp(const char* timeStr, time_t& result);

	static glwebtools::Error ConvertDateToTimestamp(const char* timeStr, time_t& result);

};

}//glwebtools

#endif  //_GLWEBTOOLS_TIME_INCLUDED_