4 #ifndef RUDIMENTS_DATETIME_H 5 #define RUDIMENTS_DATETIME_H 7 #include <rudiments/private/datetimeincludes.h> 31 bool initialize(
const char *tmstring);
38 bool initialize(time_t seconds);
45 bool initialize(time_t seconds, time_t microseconds);
58 bool initialize(
const void *tmstruct);
65 bool getSystemDateAndTime();
77 bool getHardwareDateAndTime(
const char *hwtz);
86 bool getAdjustedHardwareDateAndTime(
const char *hwtz);
92 bool setSystemDateAndTime();
104 bool setHardwareDateAndTime(
const char *hwtz);
109 int32_t getHour()
const;
113 int32_t getMinutes()
const;
117 int32_t getSeconds()
const;
121 int32_t getMicroseconds()
const;
125 int32_t getMonth()
const;
130 const char *getMonthName()
const;
135 const char *getMonthAbbreviation()
const;
140 int32_t getDayOfMonth()
const;
145 int32_t getDayOfWeek()
const;
150 int32_t getDayOfYear()
const;
155 int32_t getYear()
const;
159 bool isDaylightSavingsTime()
const;
162 const char *getTimeZoneString()
const;
165 int32_t getTimeZoneOffset()
const;
177 bool adjustTimeZone(
const char *newtz);
189 bool adjustTimeZone(
const char *newtz,
bool ignoredst);
194 bool setSeconds(int32_t seconds);
199 bool setMicroseconds(int32_t microseconds);
203 bool setMinutes(int32_t minutes);
207 bool setHours(int32_t hours);
211 bool setDays(int32_t days);
215 bool setMonths(int32_t months);
219 bool setYears(int32_t years);
223 bool addSeconds(int32_t seconds);
227 bool addMicroseconds(int32_t microseconds);
231 bool addMinutes(int32_t minutes);
235 bool addHours(int32_t hours);
239 bool addDays(int32_t days);
243 bool addMonths(int32_t months);
247 bool addYears(int32_t years);
256 const char *getString();
270 const char *getString(
bool microseconds);
273 time_t getEpoch()
const;
278 static const char *
const *getTimeZoneAbbreviations();
284 static const int32_t *getTimeZoneOffsets();
292 static bool validDateTime(
const char *
string);
300 static char *getString(time_t seconds);
308 static char *getString(time_t seconds, time_t microseconds);
316 static char *getString(
const void *tmstruct);
324 static time_t getEpoch(
const char *datestring);
332 static time_t getEpoch(
const void *tmstruct);
347 #include <rudiments/private/datetime.h> Definition: threadmutex.h:13
Definition: datetime.h:14