6 #ifndef ACE_TIME_EPOCH_H
7 #define ACE_TIME_EPOCH_H
10 #include "EpochConverterHinnant.h"
15 #define ACE_TIME_EPOCH_CONVERTER EpochConverterHinnant
28 return sCurrentEpochYear;
33 sCurrentEpochYear = year;
42 return ACE_TIME_EPOCH_CONVERTER::toEpochDays(year, 1, 1);
51 return sDaysToCurrentEpochFromInternalEpoch;
59 return ACE_TIME_EPOCH_CONVERTER::kDaysToInternalEpochFromUnixEpoch
60 + sDaysToCurrentEpochFromInternalEpoch;
115 static int16_t sCurrentEpochYear;
118 static int32_t sDaysToCurrentEpochFromInternalEpoch;
Utility functions for setting, retrieving, and converting the current epoch.
static int32_t daysToCurrentEpochFromInternalEpoch()
Number of days from the internal epoch (2000-01-01) to the current epoch.
static int16_t epochValidYearLower()
The smallest year (inclusive) for which calculations involving the 32-bit epoch_seconds and time zone...
static void currentEpochYear(int16_t year)
Set the current epoch year.
static int16_t currentEpochYear()
Get the current epoch year.
static int16_t epochValidYearUpper()
The largest year (exclusive) for which calculations involving the 32-bit epoch_seconds and time zone ...
static int32_t daysToCurrentEpochFromUnixEpoch()
Return the number of days from the Unix epoch (1970-01-01T00:00:00) to the current epoch.
static int32_t daysFromInternalEpoch(int16_t year)
Return number of days to the given {year}-01-01 from the converter epoch of 2000-01-01.
static int64_t secondsToCurrentEpochFromUnixEpoch64()
Return the number of seconds from the Unix epoch (1970-01-01T00:00:00) to the current epoch.