benilla-re systems structs docs

tm

struct · crt · 36 bytes

Meaning
Holds broken-down time: seconds to years since 1900, the weekday, the day of the year and the daylight flag
Confidence
verified, proof one
Finding
crt/time#breaking-a-time-down-in-utc

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.

Fields 9

offsetsizetypenamemeaningconfidencefinding
0x00004int32_ttm_secHolds the seconds of the minuteverified, proof onecrt/time#breaking-a-time-down-in-utc
0x00044int32_ttm_minHolds the minutes of the hourverified, proof onecrt/time#breaking-a-time-down-in-utc
0x00084int32_ttm_hourHolds the hour of the dayverified, proof onecrt/time#breaking-a-time-down-in-utc
0x000c4int32_ttm_mdayHolds the day of the month from 1verified, proof onecrt/time#breaking-a-time-down-in-utc
0x00104int32_ttm_monHolds the month from 0verified, proof onecrt/time#breaking-a-time-down-in-utc
0x00144int32_ttm_yearHolds the years since 1900verified, proof onecrt/time#breaking-a-time-down-in-utc
0x00184int32_ttm_wdayHolds the weekday, Sunday 0verified, proof onecrt/time#breaking-a-time-down-in-utc
0x001c4int32_ttm_ydayHolds the day of the year from 0verified, proof onecrt/time#breaking-a-time-down-in-utc
0x00204int32_ttm_isdstHolds the daylight flag: positive in daylight time, 0 not, negative unknown to mktimeverified, proof onecrt/time#breaking-a-time-down-in-utc