commonlib
utc_time.h File Reference

UTCTime converts stores human readable UTC time format offers conversions to DateTime and UnixTime format. More...

#include "synchronization.h"
#include <string>
#include <ctime>

Go to the source code of this file.

Classes

class  UTCTime
 

Detailed Description

UTCTime converts stores human readable UTC time format offers conversions to DateTime and UnixTime format.

Author
Luka Jerman
Date
09/07/2020
Version
1.0

DESCRIPTION

Coordinated Universal Time (UTC) is used to represent absolute time independent of location and seasons. UTCTime offers human readable constructor for UTCTime and conversions into DateTime format and unix time. The conversion relies on the compiler implementation of std::time_t. This isn't standardized but is usually implemented int64 having a value unix time, seconds since 1 January of 1970. Therefore times before the unix epoch aren't handled and can not be used in UTCTime objects. Also conversions to unix time are done directly by casting std::time_t into int64_t