diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/time-zone-rules.html | |
new repository
Diffstat (limited to 'devdocs/elisp/time-zone-rules.html')
| -rw-r--r-- | devdocs/elisp/time-zone-rules.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/devdocs/elisp/time-zone-rules.html b/devdocs/elisp/time-zone-rules.html new file mode 100644 index 00000000..e5fbbfae --- /dev/null +++ b/devdocs/elisp/time-zone-rules.html @@ -0,0 +1,10 @@ + <h3 class="section">Time Zone Rules</h3> <p>The default time zone is determined by the <code>TZ</code> environment variable. See <a href="system-environment">System Environment</a>. For example, you can tell Emacs to default to Universal Time with <code>(setenv "TZ" "UTC0")</code>. If <code>TZ</code> is not in the environment, Emacs uses system wall clock time, which is a platform-dependent default time zone. </p> <p>The set of supported <code>TZ</code> strings is system-dependent. GNU and many other systems support the tzdata database, e.g., ‘<samp>"America/New_York"</samp>’ specifies the time zone and daylight saving time history for locations near New York City. GNU and most other systems support POSIX-style <code>TZ</code> strings, e.g., ‘<samp>"EST+5EDT,M4.1.0/2,M10.5.0/2"</samp>’ specifies the rules used in New York from 1987 through 2006. All systems support the string ‘<samp>"UTC0"</samp>’ meaning Universal Time. </p> <p>Functions that convert to and from local time accept an optional <em>time zone rule</em> argument, which specifies the conversion’s time zone and daylight saving time history. If the time zone rule is omitted or <code>nil</code>, the conversion uses Emacs’s default time zone. If it is <code>t</code>, the conversion uses Universal Time. If it is <code>wall</code>, the conversion uses the system wall clock time. If it is a string, the conversion uses the time zone rule equivalent to setting <code>TZ</code> to that string. If it is a list (<var>offset</var> <var>abbr</var>), where <var>offset</var> is an integer number of seconds east of Universal Time and <var>abbr</var> is a string, the conversion uses a fixed time zone with the given offset and abbreviation. An integer <var>offset</var> is treated as if it were (<var>offset</var> <var>abbr</var>), where <var>abbr</var> is a numeric abbreviation on POSIX-compatible platforms and is unspecified on MS-Windows. </p> <dl> <dt id="current-time-zone">Function: <strong>current-time-zone</strong> <em>&optional time zone</em> +</dt> <dd> + <p>This function returns a list describing the time zone that the user is in. </p> <p>The value has the form <code>(<var>offset</var> <var>abbr</var>)</code>. Here <var>offset</var> is an integer giving the number of seconds ahead of Universal Time (east of Greenwich). A negative value means west of Greenwich. The second element, <var>abbr</var>, is a string giving an abbreviation for the time zone, e.g., ‘<samp>"CST"</samp>’ for China Standard Time or for U.S. Central Standard Time. Both elements can change when daylight saving time begins or ends; if the user has specified a time zone that does not use a seasonal time adjustment, then the value is constant through time. </p> <p>If the operating system doesn’t supply all the information necessary to compute the value, the unknown elements of the list are <code>nil</code>. </p> <p>The argument <var>time</var>, if given, specifies a time value to analyze instead of the current time. The optional argument <var>zone</var> defaults to the current time zone rule. The operating system limits the range of time and zone values. </p> +</dd> +</dl><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Time-Zone-Rules.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Time-Zone-Rules.html</a> + </p> +</div> |
