_gmtime
function · crt · primitive
- Address
0x7421da· 266 bytes, up to0x7422e3- Signature
tm * __cdecl (const int32_t *t)- Meaning
- Breaks a 32-bit time down in UTC into the thread's tm buffer; null for a negative time
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- crt/time#breaking-a-time-down-in-utc
- Test
crt::crt_gmtime_difftest
Finding: Breaking a time down in UTC in crt: calendar time
gmtime(&t) answers null for a negative time. Otherwise it fills the calling thread's 36-byte
buffer, allocated on first use: the year from blocks of 1461 days from 1970, whose third year is
the one of 366 days; tm_yday from 0; the month as the last whose entry in the days-before-month
table, _lpdays in that year and _days in the others, is below tm_yday; tm_mday as
tm_yday less that entry; tm_wday from day 0, a Thursday; then the hours, minutes and seconds;
tm_isdst 0. The tables hold the days before each month less one, so January's entry is -1.
The derivation is in the doc.
Callers 3
- ScriptDate ui
- _localtime crt
- __make_time_t crt
Callees 2
Calls and jumps by a bare address, from tables/calls.tsv.