From 51a714e101630c9f40d460339123c2bf89d4d1ca Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 8 Aug 2011 12:06:34 -0400 Subject: [PATCH] Fix explanation about setting the time zone in Lisp manual. * doc/lispref/os.texi (Time of Day): Remove set-time-zone-rule, and recommend using setenv instead. --- doc/lispref/ChangeLog | 5 +++++ doc/lispref/os.texi | 36 +++++++++++++++++------------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index f08ee3a227c..bf170100922 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-08-08 Chong Yidong + + * os.texi (Time of Day): Remove set-time-zone-rule, and recommend + using setenv instead. + 2011-07-28 Eli Zaretskii * display.texi (Bidirectional Display): Document the fact that diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 5f422065c5b..8533b77b219 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -1143,6 +1143,18 @@ get with the function @code{file-attributes}. @xref{Definition of file-attributes}. @end defun +@defun float-time &optional time-value +This function returns the current time as a floating-point number of +seconds since the epoch. The argument @var{time-value}, if given, +specifies a time to convert instead of the current time. The argument +should have the same form as for @code{current-time-string} (see +above). Thus, it accepts the output of @code{current-time} and +@code{file-attributes} (@pxref{Definition of file-attributes}). + +@emph{Warning}: Since the result is floating point, it may not be +exact. Do not use this function if precise time stamps are required. +@end defun + @defun current-time-zone &optional time-value This function returns a list describing the time zone that the user is in. @@ -1165,25 +1177,11 @@ times obtained from @code{current-time} (see above) and from @code{file-attributes}. @xref{Definition of file-attributes}. @end defun -@defun set-time-zone-rule tz -This function specifies the local time zone according to @var{tz}. If -@var{tz} is @code{nil}, that means to use an implementation-defined -default time zone. If @var{tz} is @code{t}, that means to use -Universal Time. Otherwise, @var{tz} should be a string specifying a -time zone rule. -@end defun - -@defun float-time &optional time-value -This function returns the current time as a floating-point number of -seconds since the epoch. The argument @var{time-value}, if given, -specifies a time to convert instead of the current time. The argument -should have the same form as for @code{current-time-string} (see -above). Thus, it accepts the output of @code{current-time} and -@code{file-attributes} (@pxref{Definition of file-attributes}). - -@emph{Warning}: Since the result is floating point, it may not be -exact. Do not use this function if precise time stamps are required. -@end defun +The current time zone is determined by the @samp{TZ} environment +variable. @xref{System Environment}. For example, you can tell Emacs +to use universal time with @code{(setenv "TZ" "UTC0")}. If @samp{TZ} +is not in the environment, Emacs uses a platform-dependent default +time zone. @node Time Conversion @section Time Conversion -- 2.39.2