⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tzset.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>tzset</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_010_199">&nbsp;</a>NAME</h4><blockquote>tzset - set time zone conversion information</blockquote><h4><a name = "tag_000_010_200">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;<a href="time.h.html">time.h</a>&gt;void tzset (void);extern char *tzname[];extern long int timezone;extern int daylight;</code></pre></blockquote><h4><a name = "tag_000_010_201">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>tzset()</i>function uses the value of the environment variable<i>TZ</i>to set time conversion information used by<i><a href="localtime.html">localtime()</a></i>,<i><a href="ctime.html">ctime()</a></i>,<i><a href="strftime.html">strftime()</a></i>and<i><a href="mktime.html">mktime()</a></i>.If<i>TZ</i>is absent from the environment, implementation-dependentdefault time zone information is used.<p>The<i>tzset()</i>function sets the external variable<i>tzname</i>as follows:<pre><code>tzname[0] = "std";tzname[1] = "dst";</code></pre>where <i>std</i> and <i>dst</i> are as described in the <b>XBD</b> specification, <a href="../xbd/envvar.html"><b>Environment Variables</b>&nbsp;</a>.<p>The<i>tzset()</i>function also sets the external variable<i>daylight</i>to 0 if Daylight Savings Time conversions should never be applied for the timezone in use; otherwise non-zero.  The external variable<i>timezone</i>is set to the difference, in seconds, between CoordinatedUniversal Time (UTC) and local standard time, for example:<p><table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>TZ</b><th align=center>timezone<tr valign=top><td align=left>EST<td align=left>5*60*60<tr valign=top><td align=left>GMT<td align=left>0*60*60<tr valign=top><td align=left>JST<td align=left>-9*60*60<tr valign=top><td align=left>MET<td align=left>-1*60*60<tr valign=top><td align=left>MST<td align=left>7*60*60<tr valign=top><td align=left>PST<td align=left>8*60*60</table></blockquote><h4><a name = "tag_000_010_202">&nbsp;</a>RETURN VALUE</h4><blockquote>The<i>tzset()</i>function returns no value.</blockquote><h4><a name = "tag_000_010_203">&nbsp;</a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_000_010_204">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_205">&nbsp;</a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_206">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_207">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="ctime.html">ctime()</a></i>,<i><a href="localtime.html">localtime()</a></i>,<i><a href="mktime.html">mktime()</a></i>,<i><a href="strftime.html">strftime()</a></i>,<i><a href="time.h.html">&lt;time.h&gt;</a></i>.<br></blockquote><h4>DERIVATION</h4><blockquote>Derived from Issue 1 of the SVID.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -