php-internal-docs 8.4.8
Unofficial docs for php/php-src
|
Go to the source code of this file.
Functions | |
void | timelib_unixtime2date (timelib_sll ts, timelib_sll *y, timelib_sll *m, timelib_sll *d) |
void | timelib_unixtime2gmt (timelib_time *tm, timelib_sll ts) |
void | timelib_update_from_sse (timelib_time *tm) |
void | timelib_unixtime2local (timelib_time *tm, timelib_sll ts) |
void | timelib_set_timezone_from_offset (timelib_time *t, timelib_sll utc_offset) |
void | timelib_set_timezone_from_abbr (timelib_time *t, timelib_abbr_info abbr_info) |
void | timelib_set_timezone (timelib_time *t, timelib_tzinfo *tz) |
int | timelib_apply_localtime (timelib_time *t, unsigned int localtime) |
int timelib_apply_localtime | ( | timelib_time * | t, |
unsigned int | localtime ) |
Definition at line 218 of file unixtime2tm.c.
void timelib_set_timezone | ( | timelib_time * | t, |
timelib_tzinfo * | tz ) |
Attaches the time zone information in 'tz' to to 't'.
It fetches the right UTC offset that is currently stored in the time stamp field in 't' ('sse'), and assigns that to the 'z' field and 'dst' field (whether DST is in effect at the time). It also sets the current abbreviation to the 'tz_addr' field, making sure that if a value was already set it was freed.
The time zone information in 'tz' is not duplicated into the 't' field so it should not be freed until all timelib_time* variables have been freed as well.
Definition at line 191 of file unixtime2tm.c.
void timelib_set_timezone_from_abbr | ( | timelib_time * | t, |
timelib_abbr_info | abbr_info ) |
Attaches the information from 'abbr_info' as time zone information to 't'.
The timelib_abbr_info struct contains an abbreviation ('abbr') which string value is duplicated, as well as a 'utc_offset' and 'dst' flag. It only supports a 'dst' change over of 1 hour.
Definition at line 177 of file unixtime2tm.c.
void timelib_set_timezone_from_offset | ( | timelib_time * | t, |
timelib_sll | utc_offset ) |
Attaches the UTC offset as time zone information to 't'.
'utc_offset' is in seconds East of UTC.
Definition at line 163 of file unixtime2tm.c.
void timelib_unixtime2date | ( | timelib_sll | ts, |
timelib_sll * | y, | ||
timelib_sll * | m, | ||
timelib_sll * | d ) |
Takes the unix timestamp in seconds from 'ts', and calculates y, m, and d, in the proleptic Gregorian calendar.
It uses the algorithm from howardhinnant.github.io/date_algorithms.html
Definition at line 29 of file unixtime2tm.c.
void timelib_unixtime2gmt | ( | timelib_time * | tm, |
timelib_sll | ts ) |
Takes the unix timestamp in seconds from 'ts' and populates the y/m/d/h/i/s fields of 'tm' without taking time zones into account
Definition at line 57 of file unixtime2tm.c.
void timelib_unixtime2local | ( | timelib_time * | tm, |
timelib_sll | ts ) |
Takes the Unix timestamp from 'ts', and calculates the y/m/d/h/i/s fields according to the time zone information attached to 'tm'.
Definition at line 120 of file unixtime2tm.c.
void timelib_update_from_sse | ( | timelib_time * | tm | ) |
Takes the Unix timestamp stored in 'tm', and calculates the y/m/d/h/i/s fields according to the time zone information attached to 'tm'.
Definition at line 83 of file unixtime2tm.c.