tm(3)
π tm(3) π
okay bestie, gather round, because we're about to talk about tm β the little struct from avr-libc that takes time and breaks it down into cute little Gregorian-calendar pieces. it's giving β¨calendar girlβ¨ energy. no cap.
πΈ SYNOPSIS πΈ
β¨ Data Fields β¨
here's the whole squad, all the fields, no one left behind:
int8_t tm_sec
int8_t tm_min
int8_t tm_hour
int8_t tm_mday
int8_t tm_wday
int8_t tm_mon
int16_t tm_year
int16_t tm_yday
int16_t tm_isdst
π Detailed Description π
The tm structure contains a representation of time 'broken down' into components of the Gregorian calendar. it's literally time, but chopped into snackable pieces. π
The value of tm_isdst is zero if Daylight Saving Time is not in effect, and is negative if the information is not available.
When Daylight Saving Time is in effect, the value represents the number of seconds the clock is advanced.
π«Ά See the set_dst() function for more information about Daylight Saving. go read it, iykyk.
π Field Documentation π
π int8_t tm::tm_hour
hours since midnight β [ 0 to 23 ]. midnight to almost-midnight, the whole rotation. β
π int16_t tm::tm_isdst
Daylight Saving Time flag. bestie, remember: zero = not in effect, negative = we don't know, and when it is in effect the value is the number of seconds the clock is advanced. π
πΈ int8_t tm::tm_mday
day of the month β [ 1 to 31 ]. yes it starts at 1, not 0. not me getting that wrong the first time π
β¨ int8_t tm::tm_min
minutes after the hour β [ 0 to 59 ].
π¦ int8_t tm::tm_mon
months since January β [ 0 to 11 ]. january is 0, december is 11, that's just how it is, periodt.
π int8_t tm::tm_sec
seconds after the minute β [ 0 to 59 ].
π§ int8_t tm::tm_wday
days since Sunday β [ 0 to 6 ].
π₯ int16_t tm::tm_yday
days since January 1 β [ 0 to 365 ].
π int16_t tm::tm_year
years since 1900. iconic, lowkey ancient, but that's the convention and we respect it.
π Author π
Generated automatically by Doxygen for avr-libc from the source code. so technically a robot wrote this, and honestly? slay. π€β¨
okay that's the whole page, bestie, you ate it up. π this was Version 2.1.0, dated Sat Jan 29 2022 β from the avr-libc crew, who said "tm(3)" and meant it. π go forth and break down some time. π
π¦ where this page comes from
- fedora 43: avr-libc 2.2.1-3.fc43 Β· BSD-3-Clause
- fedora 44: avr-libc 2.2.1-5.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: avr-libc 2.1.0-bp160.1.33 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms