Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/time Document tzgetgmtoff(3)



details:   https://anonhg.NetBSD.org/src/rev/1bf3df160239
branches:  trunk
changeset: 341284:1bf3df160239
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 29 17:51:58 2015 +0000

description:
Document tzgetgmtoff(3)

diffstat:

 lib/libc/time/tzset.3 |  20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diffs (54 lines):

diff -r afa3a81e28f5 -r 1bf3df160239 lib/libc/time/tzset.3
--- a/lib/libc/time/tzset.3     Thu Oct 29 17:49:24 2015 +0000
+++ b/lib/libc/time/tzset.3     Thu Oct 29 17:51:58 2015 +0000
@@ -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 @@
 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 @@
 .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



Home | Main Index | Thread Index | Old Index