aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2016-04-12 08:50:47 -0700
committerPaul Eggert2016-04-12 08:50:47 -0700
commit7c2c2196fd4be0b656bdf0e0b68f3d7c4a5eca08 (patch)
treec038edb545cc82ee825390d1e7691a247fd7fc5f /doc
parent435da5d2955ce35be4785b7d46566ed9b42ea9fb (diff)
parentca509810014726cf6bee9f7e8f69bdeaf62dc146 (diff)
downloademacs-7c2c2196fd4be0b656bdf0e0b68f3d7c4a5eca08.tar.gz
emacs-7c2c2196fd4be0b656bdf0e0b68f3d7c4a5eca08.zip
Merge from origin/emacs-25
ca50981 Improve time zone documentation c23c965 Prevent bootstrap autoload backup files 9344612 Disable multicolor fonts on OS X since they are not supported... c41ce1c Capitalize “Universal Time” in documentation 10597c9 Don't use 'find-program'
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/cmdargs.texi5
-rw-r--r--doc/lispref/os.texi67
2 files changed, 45 insertions, 27 deletions
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 646c8da1bb8..444d30527f8 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -641,8 +641,9 @@ to put temporary files (@pxref{Backup}). Emacs tries to use
641@env{TMP}, then @env{TEMP}, and finally @file{c:/temp}. 641@env{TMP}, then @env{TEMP}, and finally @file{c:/temp}.
642@item TZ 642@item TZ
643@vindex TZ, environment variable 643@vindex TZ, environment variable
644This specifies the current time zone and possibly also daylight 644This specifies the default time zone and possibly also daylight
645saving time information. On MS-DOS, if @env{TZ} is not set in the 645saving time information. @xref{Time Zone Rules,,, elisp, The GNU
646Emacs Lisp Reference Manual}. On MS-DOS, if @env{TZ} is not set in the
646environment when Emacs starts, Emacs defines a default value as 647environment when Emacs starts, Emacs defines a default value as
647appropriate for the country code returned by DOS@. On MS-Windows, Emacs 648appropriate for the country code returned by DOS@. On MS-Windows, Emacs
648does not use @env{TZ} at all. 649does not use @env{TZ} at all.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 03d04ba3cf3..6e0edec2943 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -19,6 +19,7 @@ terminal and the screen.
19* System Environment:: Distinguish the name and kind of system. 19* System Environment:: Distinguish the name and kind of system.
20* User Identification:: Finding the name and user id of the user. 20* User Identification:: Finding the name and user id of the user.
21* Time of Day:: Getting the current time. 21* Time of Day:: Getting the current time.
22* Time Zone Rules:: Rules for time zones and daylight saving time.
22* Time Conversion:: Converting a time from numeric form to 23* Time Conversion:: Converting a time from numeric form to
23 calendrical data and vice versa. 24 calendrical data and vice versa.
24* Time Parsing:: Converting a time from numeric form to text 25* Time Parsing:: Converting a time from numeric form to text
@@ -1259,7 +1260,7 @@ information may some day be added at the end.
1259 1260
1260The argument @var{time}, if given, specifies a time to format, 1261The argument @var{time}, if given, specifies a time to format,
1261instead of the current time. The optional argument @var{zone} 1262instead of the current time. The optional argument @var{zone}
1262defaults to the current time zone rule. 1263defaults to the current time zone rule. @xref{Time Zone Rules}.
1263 1264
1264@example 1265@example
1265@group 1266@group
@@ -1296,26 +1297,9 @@ For example, if @var{time} is a number, @code{(time-to-seconds
1296or rounding errors occur. 1297or rounding errors occur.
1297@end defun 1298@end defun
1298 1299
1299@defun current-time-zone &optional time zone 1300@node Time Zone Rules
1300@cindex time zone, current 1301@section Time Zone Rules
1301This function returns a list describing the time zone that the user is 1302@cindex time zone rules
1302in.
1303
1304The value has the form @code{(@var{offset} @var{name})}. Here
1305@var{offset} is an integer giving the number of seconds ahead of Universal Time
1306(east of Greenwich). A negative value means west of Greenwich. The
1307second element, @var{name}, is a string giving the name of the time
1308zone. Both elements change when daylight saving time begins or ends;
1309if the user has specified a time zone that does not use a seasonal time
1310adjustment, then the value is constant through time.
1311
1312If the operating system doesn't supply all the information necessary to
1313compute the value, the unknown elements of the list are @code{nil}.
1314
1315The argument @var{time}, if given, specifies a time value to
1316analyze instead of the current time. The optional argument @var{zone}
1317defaults to the current time zone rule.
1318@end defun
1319 1303
1320@vindex TZ, environment variable 1304@vindex TZ, environment variable
1321The default time zone is determined by the @env{TZ} environment 1305The default time zone is determined by the @env{TZ} environment
@@ -1324,6 +1308,15 @@ to default to Universal Time with @code{(setenv "TZ" "UTC0")}. If
1324@env{TZ} is not in the environment, Emacs uses system wall clock time, 1308@env{TZ} is not in the environment, Emacs uses system wall clock time,
1325which is a platform-dependent default time zone. 1309which is a platform-dependent default time zone.
1326 1310
1311The set of supported @env{TZ} strings is system-dependent. GNU and
1312many other systems support the tzdata database, e.g.,
1313@samp{"America/New_York"} specifies the time zone and daylight saving
1314time history for locations near New York City. GNU and most other
1315systems support POSIX-style @env{TZ} strings, e.g.,
1316@samp{"EST+5EDT,M4.1.0/2,M10.5.0/2"} specifies the rules used in New
1317York from 1987 through 2006. All systems support the string
1318@samp{"UTC0"} meaning Universal Time.
1319
1327@cindex time zone rule 1320@cindex time zone rule
1328Functions that convert to and from local time accept an optional 1321Functions that convert to and from local time accept an optional
1329@dfn{time zone rule} argument, which specifies the conversion's time 1322@dfn{time zone rule} argument, which specifies the conversion's time
@@ -1334,6 +1327,29 @@ If it is @code{t}, the conversion uses Universal Time. If it is
1334a string, the conversion uses the time zone rule equivalent to setting 1327a string, the conversion uses the time zone rule equivalent to setting
1335@env{TZ} to that string. 1328@env{TZ} to that string.
1336 1329
1330@defun current-time-zone &optional time zone
1331@cindex time zone, current
1332This function returns a list describing the time zone that the user is
1333in.
1334
1335The value has the form @code{(@var{offset} @var{abbr})}. Here
1336@var{offset} is an integer giving the number of seconds ahead of Universal Time
1337(east of Greenwich). A negative value means west of Greenwich. The
1338second element, @var{abbr}, is a string giving an abbreviation for the
1339time zone, e.g., @samp{"CST"} for China Standard Time or for
1340U.S. Central Standard Time. Both elements can change when daylight
1341saving time begins or ends; if the user has specified a time zone that
1342does not use a seasonal time adjustment, then the value is constant
1343through time.
1344
1345If the operating system doesn't supply all the information necessary to
1346compute the value, the unknown elements of the list are @code{nil}.
1347
1348The argument @var{time}, if given, specifies a time value to
1349analyze instead of the current time. The optional argument @var{zone}
1350defaults to the current time zone rule.
1351@end defun
1352
1337@node Time Conversion 1353@node Time Conversion
1338@section Time Conversion 1354@section Time Conversion
1339@cindex calendrical information 1355@cindex calendrical information
@@ -1358,8 +1374,8 @@ as traditional Gregorian years do; for example, the year number
1358@defun decode-time &optional time zone 1374@defun decode-time &optional time zone
1359This function converts a time value into calendrical information. If 1375This function converts a time value into calendrical information. If
1360you don't specify @var{time}, it decodes the current time, and similarly 1376you don't specify @var{time}, it decodes the current time, and similarly
1361@var{zone} defaults to the current time zone rule. The return 1377@var{zone} defaults to the current time zone rule. @xref{Time Zone Rules}.
1362value is a list of nine elements, as follows: 1378The return value is a list of nine elements, as follows:
1363 1379
1364@example 1380@example
1365(@var{seconds} @var{minutes} @var{hour} @var{day} @var{month} @var{year} @var{dow} @var{dst} @var{utcoff}) 1381(@var{seconds} @var{minutes} @var{hour} @var{day} @var{month} @var{year} @var{dow} @var{dst} @var{utcoff})
@@ -1406,6 +1422,7 @@ to stand for years above 1900, or years above 2000, you must alter them
1406yourself before you call @code{encode-time}. 1422yourself before you call @code{encode-time}.
1407 1423
1408The optional argument @var{zone} defaults to the current time zone rule. 1424The optional argument @var{zone} defaults to the current time zone rule.
1425@xref{Time Zone Rules}.
1409In addition to the usual time zone rule values, it can also be a list 1426In addition to the usual time zone rule values, it can also be a list
1410(as you would get from @code{current-time-zone}) or an integer (as 1427(as you would get from @code{current-time-zone}) or an integer (as
1411from @code{decode-time}), applied without any further alteration for 1428from @code{decode-time}), applied without any further alteration for
@@ -1449,8 +1466,8 @@ corresponding time value.
1449 1466
1450This function converts @var{time} (or the current time, if 1467This function converts @var{time} (or the current time, if
1451@var{time} is omitted) to a string according to 1468@var{time} is omitted) to a string according to
1452@var{format-string}. The conversion uses the time zone rule @var{zone} 1469@var{format-string}. The conversion uses the time zone rule @var{zone}, which
1453(or the current time zone rule, if omitted). The argument 1470defaults to the current time zone rule. @xref{Time Zone Rules}. The argument
1454@var{format-string} may contain @samp{%}-sequences which say to 1471@var{format-string} may contain @samp{%}-sequences which say to
1455substitute parts of the time. Here is a table of what the 1472substitute parts of the time. Here is a table of what the
1456@samp{%}-sequences mean: 1473@samp{%}-sequences mean: