Module Name: src Committed By: christos Date: Thu Oct 29 17:51:58 UTC 2015
Modified Files: src/lib/libc/time: tzset.3 Log Message: Document tzgetgmtoff(3) To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libc/time/tzset.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/time/tzset.3 diff -u src/lib/libc/time/tzset.3:1.32 src/lib/libc/time/tzset.3:1.33 --- src/lib/libc/time/tzset.3:1.32 Sun Apr 5 04:36:38 2015 +++ src/lib/libc/time/tzset.3 Thu Oct 29 13:51:58 2015 @@ -1,11 +1,12 @@ -.\" $NetBSD: tzset.3,v 1.32 2015/04/05 08:36:38 pgoyette Exp $ -.Dd October 23, 2014 +.\" $NetBSD: tzset.3,v 1.33 2015/10/29 17:51:58 christos Exp $ +.Dd October 29, 2015 .Dt TZSET 3 .Os .Sh NAME .Nm tzset , .Nm tzalloc , .Nm tzgetname , +.Nm tzgetgmtoff , .Nm tzfree .Nd initialize time conversion information .Sh LIBRARY @@ -18,6 +19,8 @@ .Fn tzfree "timezone_t restrict tz" .Ft const char * .Fn tzgetname "timezone_t restrict tz" "int isdst" +.Ft long +.Fn tzgetgmtoff "timezone_t restrict tz" "int isdst" .Ft void .Fn tzset "void" .Sh DESCRIPTION @@ -70,7 +73,7 @@ This invalidates any pointers that .Fa tz was used to set. -Finally, +The function .Fn tzgetname returns the name for the given .Fa tz . @@ -86,6 +89,17 @@ is set to .Va 1 the call is equivalent to .Va tzname[1] . +Finally, the +.Fn tzgetgmtoff +function acts like +.Fn tzgetname +only it returns the offset in seconds from GMT for the timezone. +If there is no match, then +.Dv \-1 +is returned and +.Va errno +is set to +.Dv ESRCH . The .Fn tzset function acts like