1 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .TH TIMEGM 3 2021-03-22 "Linux man-pages (unreleased)"
7 timegm, timelocal \- inverses of gmtime and localtime
10 .RI ( libc ", " \-lc )
15 .BI "time_t timelocal(struct tm *" tm );
16 .BI "time_t timegm(struct tm *" tm );
20 Feature Test Macro Requirements for glibc (see
21 .BR feature_test_macros (7)):
29 Glibc 2.19 and earlier:
30 _BSD_SOURCE || _SVID_SOURCE
41 Both functions take a broken-down time and convert it to calendar time
42 (seconds since the Epoch, 1970-01-01 00:00:00 +0000, UTC).
43 The difference between the two functions is that
45 takes the local timezone into account when doing the conversion, while
47 takes the input value to be Coordinated Universal Time (UTC).
50 these functions return the calendar time (seconds since the Epoch),
51 expressed as a value of type
53 On error, they return the value
57 to indicate the error.
61 The result cannot be represented.
63 For an explanation of the terms used in this section, see
71 Interface Attribute Value
75 T} Thread safety MT-Safe env locale
81 These functions are nonstandard GNU extensions
82 that are also present on the BSDs.
86 function is equivalent to the POSIX standard function
88 There is no reason to ever use it.