---
name: "tm"
section: "3type"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/tm/3type"
---

# tm(3type)

broken-down time

## NAME

tm - broken-down time

## LIBRARY

Standard C library (*libc*)

## SYNOPSIS

```
#include <time.h>
```

**struct tm {**     **int         tm\_sec;**    /\* Seconds          \[**0**, **60**\] \*/     **int         tm\_min;**    /\* Minutes          \[**0**, **59**\] \*/     **int         tm\_hour;**   /\* Hour             \[**0**, **23**\] \*/     **int         tm\_mday;**   /\* Day of the month \[**1**, **31**\] \*/     **int         tm\_mon;**    /\* Month            \[**0**, **11**\]  (January = **0**) \*/     **int         tm\_year;**   /\* Year minus **1900** \*/     **int         tm\_wday;**   /\* Day of the week  \[**0**, **6**\]   (Sunday = **0**) \*/     **int         tm\_yday;**   /\* Day of the year  \[**0**, **365**\] (Jan/01 = **0**) \*/     **int         tm\_isdst;**  /\* Daylight savings flag \*/\
     /\* Since POSIX.1-2024:  \*/     **long        tm\_gmtoff;** /\* Seconds East of UTC \*/     **const char \*tm\_zone;**   /\* Timezone abbreviation \*/ **};**

Feature Test Macro Requirements for glibc (see [**feature\_test\_macros**(7)](/feature_test_macros/7.md)):

*tm\_gmtoff*, *tm\_zone*:

```
    Since glibc 2.20:
        _DEFAULT_SOURCE
    glibc 2.20 and earlier:
        _BSD_SOURCE
```

## DESCRIPTION

Describes time, broken down into distinct components.

*tm\_isdst* describes whether daylight saving time is in effect at the time described. The value is positive if daylight saving time is in effect, zero if it is not, and negative if the information is not available.

*tm\_gmtoff* is the difference, in seconds, of the timezone represented by this broken-down time and UTC (this is the additive inverse of [**timezone**(3)](/timezone/3.md)).

*tm\_zone* is the equivalent of [**tzname**(3)](/tzname/3.md) for the timezone represented by this broken-down time.

## VERSIONS

In C90, *tm\_sec* could represent values in the range \[**0**, **61**\], which could represent a double leap second. UTC doesn't permit double leap seconds, so it was limited to **60** in C99.

[**timezone**(3)](/timezone/3.md), as a variable, is an XSI extension: some systems provide the V7-compatible [**timezone**(3)](/timezone/3.md) function. The *tm\_gmtoff* field provides an alternative (with the opposite sign) for those systems.

*tm\_zone* points to static storage and may be overridden on subsequent calls to [**localtime**(3)](/localtime/3.md) and similar functions (however, this never happens under glibc).

## STANDARDS

C23, POSIX.1-2024.

## HISTORY

C89, POSIX.1-1988.

*tm\_gmtoff* and *tm\_zone* originate from 4.3BSD-Tahoe (where *tm\_zone* is a *char \**), and were first standardized in POSIX.1-2024.

## NOTES

*tm\_sec* can represent a leap second with the value **60**.

## SEE ALSO

[**ctime**(3)](/ctime/3.md), [**strftime**(3)](/strftime/3.md), [**strptime**(3)](/strptime/3.md), [**time**(7)](/time/7.md)
