php-internal-docs 8.4.8
Unofficial docs for php/php-src
|
Go to the source code of this file.
Functions | |
void | timelib_do_rel_normalize (timelib_time *base, timelib_rel_time *rt) |
void | timelib_do_normalize (timelib_time *time) |
timelib_sll | timelib_epoch_days_from_time (timelib_time *time) |
void | timelib_update_ts (timelib_time *time, timelib_tzinfo *tzi) |
void timelib_do_normalize | ( | timelib_time * | base | ) |
Takes the information from the y/m/d/h/i/s fields and makes sure their values are in the right range.
If a value under- or overflows it will adjust the larger measure up (or down). It also takes into account leap days.
Definition at line 226 of file tm2unixtime.c.
void timelib_do_rel_normalize | ( | timelib_time * | base, |
timelib_rel_time * | rt ) |
Takes the information from the y/m/d/h/i/s fields of 'rt' and makes sure their values are in the right range.
If a value under- or overflows it will adjust the larger measure up (or down). As this function operates on a relative date/time, it also takes into account leap days and correctly accounts for the difference depending on the base date/time in 'base'.
Definition at line 188 of file tm2unixtime.c.
timelib_sll timelib_epoch_days_from_time | ( | timelib_time * | time | ) |
Returns the number of days from the y/m/d fields of 'time' since the Unix Epoch.
Definition at line 453 of file tm2unixtime.c.
void timelib_update_ts | ( | timelib_time * | time, |
timelib_tzinfo * | tzi ) |
Uses the y/m/d/h/i/s fields to calculate and store the equivalent timestamp in the sse field.
It uses the time zone information associated with 'time' to account for the right UTC offset and/or DST rules. You can associate time zone information with the timelib_set_timezone_* functions (see below).
If the type is 'TIMELIB_ZONETYPE_ID' and there is no associated tzinfo, it will use the second argument 'tzi' to provide the rules necessary to calculate the right timestamp.
Definition at line 467 of file tm2unixtime.c.