timegm - Online Linux Manual PageSection : 3
Updated : 2023-02-05
Source : Linux man-pages 6.03

NAMEtimegm, timelocal − inverses of gmtime and localtime

LIBRARYStandard C library (libc, −lc)

SYNOPSIS#include <time.h>time_t timelocal(struct tm *tm); time_t timegm(struct tm *tm);Feature Test Macro Requirements for glibc (see feature_test_macros(7)): timelocal(), timegm(): Since glibc 2.19: _DEFAULT_SOURCE glibc 2.19 and earlier: _BSD_SOURCE || _SVID_SOURCE

DESCRIPTIONThe functions timelocal() and timegm() are the inverses of localtime(3) and gmtime(3). Both functions take a broken-down time and convert it to calendar time (seconds since the Epoch, 1970-01-01 00:00:00 +0000, UTC). The difference between the two functions is that timelocal() takes the local timezone into account when doing the conversion, while timegm() takes the input value to be Coordinated Universal Time (UTC).

RETURN VALUEOn success, these functions return the calendar time (seconds since the Epoch), expressed as a value of type time_t. On error, they return the value (time_t) −1 and set errno to indicate the error.

ERRORSEOVERFLOW  The result cannot be represented.

ATTRIBUTESFor an explanation of the terms used in this section, see attributes(7). InterfaceAttributeValue timelocal(), timegm() Thread safetyMT-Safe env locale

STANDARDSThese functions are nonstandard GNU extensions that are also present on the BSDs.

NOTESThe timelocal() function is equivalent to the POSIX standard function mktime(3). There is no reason to ever use it.

SEE ALSOgmtime(3), localtime(3), mktime(3), tzset(3)
0
Johanes Gumabo
Data Size   :   8,760 byte
man-timelocal.3Build   :   2024-12-29, 07:25   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 262,404
Visitor ID   :     :  
Visitor IP   :   3.139.67.67   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.