diff options
author | ache <ache@FreeBSD.org> | 1998-04-20 00:52:32 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1998-04-20 00:52:32 +0000 |
commit | 6919d0a394f8dfca3382a9fd32ac7df25833c942 (patch) | |
tree | 9eeffdd61a3aa54e83c6e51d5a9d94475a0b7b25 /lib/libc | |
parent | 0796a5c56ed9d1eaf2c8691327b581fcfa3cd05b (diff) | |
download | FreeBSD-src-6919d0a394f8dfca3382a9fd32ac7df25833c942.zip FreeBSD-src-6919d0a394f8dfca3382a9fd32ac7df25833c942.tar.gz |
Describe timegm()
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdtime/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libc/stdtime/ctime.3 | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/lib/libc/stdtime/Makefile.inc b/lib/libc/stdtime/Makefile.inc index 311b835..dd6f90c 100644 --- a/lib/libc/stdtime/Makefile.inc +++ b/lib/libc/stdtime/Makefile.inc @@ -1,5 +1,5 @@ # Makefile.inc,v 1.2 1994/09/13 21:26:01 wollman Exp -# $Id: Makefile.inc,v 1.6 1997/10/15 16:16:21 bde Exp $ +# $Id: Makefile.inc,v 1.7 1997/10/21 08:41:14 bde Exp $ .PATH: ${.CURDIR}/../libc/stdtime @@ -10,6 +10,6 @@ MAN3+= ctime.3 strftime.3 strptime.3 time2posix.3 MAN5+= tzfile.5 MLINKS+=ctime.3 asctime.3 ctime.3 difftime.3 ctime.3 gmtime.3 \ - ctime.3 localtime.3 ctime.3 mktime.3 + ctime.3 localtime.3 ctime.3 mktime.3 ctime.3 timegm.3 MLINKS+=time2posix.3 posix2time.3 .endif diff --git a/lib/libc/stdtime/ctime.3 b/lib/libc/stdtime/ctime.3 index 47ae9a1..b14a92c 100644 --- a/lib/libc/stdtime/ctime.3 +++ b/lib/libc/stdtime/ctime.3 @@ -42,9 +42,9 @@ .Nm difftime , .Nm gmtime , .Nm localtime , -.Nm mktime -.Nd transform binary date and time value to -.Tn ASCII +.Nm mktime , +.Nm timegm +.Nd transform binary date and time values .Sh SYNOPSIS .Fd #include <time.h> .Vt extern char *tzname[2]; @@ -60,6 +60,8 @@ .Fn gmtime "const time_t *clock" .Ft time_t .Fn mktime "struct tm *tm" +.Ft time_t +.Fn timegm "struct tm *tm" .Sh DESCRIPTION The functions .Fn ctime , @@ -178,6 +180,15 @@ are determined. returns the specified calendar time; if the calendar time cannot be represented, it returns \-1; .Pp +The function +.Fn timegm +is +.Fn mktime +analog, but assume that broke-down time expressed as UTC (not local) time. +This function also set +.Fa tm_isdst +field to 0. +.Pp The .Fn difftime function |