Describe timegm()

This commit is contained in:
Andrey A. Chernov 1998-04-20 00:52:32 +00:00
parent 3e425b968d
commit 53b8d408ff
2 changed files with 16 additions and 5 deletions

View File

@ -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

View File

@ -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