.\" Copyright (C) 2001 Andries Brouwer .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved. .\" Translated Thu 3 Jan 2002 by NAKANO Takeo .\" .TH TIMEGM 3 " 2016\-12\-12" GNU "Linux Programmer's Manual" .SH 名前 timegm, timelocal \- gmtime と localtime の逆関数 .SH 書式 .nf \fB#include \fP .PP \fBtime_t timelocal(struct tm *\fP\fItm\fP\fB);\fP .PP \fBtime_t timegm(struct tm *\fP\fItm\fP\fB);\fP .PP .fi .RS -4 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .RE .PP \fBtimelocal\fP(), \fBtimegm\fP(): Since glibc 2.19: _DEFAULT_SOURCE Glibc 2.19 and earlier: _BSD_SOURCE || _SVID_SOURCE .SH 説明 The functions \fBtimelocal\fP() and \fBtimegm\fP() are the inverses of \fBlocaltime\fP(3) and \fBgmtime\fP(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 \fBtimelocal\fP() takes the local timezone into account when doing the conversion, while \fBtimegm\fP() takes the input value to be Coordinated Universal Time (UTC). .SH 返り値 On success, these functions return the calendar time (seconds since the Epoch), expressed as a value of type \fItime_t\fP. On error, they return the value \fI(time_t)\ \-1\fP and set \fIerrno\fP to indicate the cause of the error. .SH エラー .TP \fBEOVERFLOW\fP The result cannot be represented. .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS allbox; lbw21 lb lb l l l. インターフェース 属性 値 T{ \fBtimelocal\fP(), \fBtimegm\fP() T} Thread safety MT\-Safe env locale .TE .SH 準拠 これらの関数は非標準で GNU の拡張である。 BSD 系にも存在する。 これらの使用は避けること。 .SH 注意 \fBtimelocal\fP() 関数は POSIX の標準関数 \fBmktime\fP(3) と同じものである。 ので、これを使う理由はないはずである。 .SH 関連項目 \fBgmtime\fP(3), \fBlocaltime\fP(3), \fBmktime\fP(3), \fBtzset\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。