tm_to_time_t()#
tm_to_time_t() converts a struct tm representation of a date and time into a time_t value, assuming UTC and without normalizing tm_wday or tm_yday.
Prototype
time_t tm_to_time_t(
const struct tm *tm
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Pointer to a |
Return Value
Returns the corresponding time_t value representing the given time in seconds since the Unix epoch (1970-01-01 00:00:00 UTC). Returns -1 if the input is out of range.
Notes
This function does not perform normalization of tm_wday or tm_yday, and it assumes the input time is in UTC.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples