|
CX Framework
Cross-platform C utility framework
|
Data Structures | |
| struct | TimeParts |
| Decomposed time structure with individual date/time components. More... | |
Typedefs | |
| typedef struct TimeParts | TimeParts |
| Decomposed time structure with individual date/time components. | |
Enumerations | |
| enum | WEEKDAYS { Sunday = 0 , Monday , Tuesday , Wednesday , Thursday , Friday , Saturday } |
| Days of the week (0-6) More... | |
Functions | |
| bool | timeDecompose (TimeParts *out, _In_range_(0, timeForever) int64 time) |
| int64 | timeCompose (TimeParts *parts) |
| int64 | timeLocal (int64 time, int64 *offset) |
Functions for converting, decomposing, and manipulating time values.
| enum WEEKDAYS |
| int64 timeCompose | ( | TimeParts * | parts | ) |
Compose a time value from individual date/time components.
Converts year, month, day, hour, minute, second, and microsecond components into a single microsecond timestamp. The wday and yday fields are ignored.
| parts | Pointer to TimeParts structure with time components to compose |
| bool timeDecompose | ( | TimeParts * | out, |
| _In_range_(0, timeForever) int64 | time | ||
| ) |
Decompose a time value into individual date/time components.
Converts a microsecond timestamp into year, month, day, hour, minute, second, and microsecond components. Also populates day of week (wday) and day of year (yday) fields for information.
| out | Pointer to TimeParts structure to receive the decomposed time |
| time | Time value in microseconds since Julian epoch |
| int64 timeLocal | ( | int64 | time, |
| int64 * | offset | ||
| ) |
Convert a time to local time.
Adjusts the given time for the local time zone rules currently in effect. Optionally returns the offset applied.
| time | Time value in microseconds since Julian epoch |
| offset | Optional pointer to receive the offset in microseconds between UTC and local time |