C++ UTC Time Library
A class to hold UTC times, and associated functionality.
|
Interface to UTCTime() class and associated functions. More...
#include <string>
#include <ctime>
Go to the source code of this file.
Classes | |
class | utctime::UTCTimeException |
Base exception class. More... | |
class | utctime::bad_time_init |
Thrown when the time cannot be initialized. More... | |
class | utctime::bad_time |
Thrown when the time cannot be obtained. More... | |
class | utctime::invalid_date |
Thrown when an invalid date is provided to the constructor. More... | |
class | utctime::UTCTime |
Namespaces | |
namespace | utctime |
Namespace for UTCTime() class and associated functions. |
Functions | |
bool | utctime::validate_date (const int year, const int month, const int day, const int hour, const int minute, const int second) |
Checks whether a supplied date is valid. | |
time_t | utctime::get_day_diff () |
Returns a time_t interval representing one day. | |
time_t | utctime::get_hour_diff () |
Returns a time_t interval representing one hour. | |
time_t | utctime::get_sec_diff () |
Returns a time_t interval representing one second. | |
int | utctime::tm_compare (const std::tm &first, const std::tm &second) |
Compares two std::tm structs. | |
int | utctime::tm_intraday_secs_diff (const std::tm &first, const std::tm &second) |
Returns the difference between two std::tm structs. | |
bool | utctime::is_leap_year (const int year) |
Checks if the supplied year is a leap year. | |
std::tm * | utctime::tm_increment_day (std::tm *changing_tm, const int quantity=1) |
Adds one or more days to a std::tm struct. | |
std::tm * | utctime::tm_increment_hour (std::tm *changing_tm, const int quantity=1) |
Adds one or more hours to a std::tm struct. | |
std::tm * | utctime::tm_increment_minute (std::tm *changing_tm, const int quantity=1) |
Adds one or more minutes to a std::tm struct. | |
std::tm * | utctime::tm_increment_second (std::tm *changing_tm, const int quantity=1) |
Adds one or more seconds to a std::tm struct. | |
std::tm * | utctime::tm_decrement_day (std::tm *changing_tm, const int quantity=1) |
Deducts one or more days from a std::tm struct. | |
std::tm * | utctime::tm_decrement_hour (std::tm *changing_tm, const int quantity=1) |
Deducts one or more hours from a std::tm struct. | |
std::tm * | utctime::tm_decrement_minute (std::tm *changing_tm, const int quantity=1) |
Deducts one or more minutes from a std::tm struct. | |
std::tm * | utctime::tm_decrement_second (std::tm *changing_tm, const int quantity=1) |
Deducts one or more seconds from a std::tm struct. | |
bool | utctime::check_utc_timestamp (const time_t check_time, int &secs_diff, const int year, const int month, const int day, const int hour, const int minute, const int second) |
Checks if a UTC timestamp is accurate. | |
time_t | utctime::get_utc_timestamp (const int year, const int month, const int day, const int hour, const int minute, const int second) |
Gets a time_t timestamp for a requested UTC time. | |
int | utctime::get_utc_timestamp_sec_diff (const time_t check_time, const int year, const int month, const int day, const int hour, const int minute, const int second) |
Checks a time_t timestamp against a UTC time. |
Interface to UTCTime() class and associated functions.