diff options
| author | Paul Eggert | 2018-10-03 09:10:01 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-10-06 23:31:04 -0700 |
| commit | 3cc452327eff056f17637566aaf05a877e61d69a (patch) | |
| tree | e702e883dab66b2a63cf1b728c3bd7ca0faabd70 /doc | |
| parent | 93fe420942c08111a6048af7c4d7807c61d80a09 (diff) | |
| download | emacs-3cc452327eff056f17637566aaf05a877e61d69a.tar.gz emacs-3cc452327eff056f17637566aaf05a877e61d69a.zip | |
Improvements on (TICKS . HZ)
This patch is in response to Eli's review (Bug#32902#10).
* src/systime.c: Doc strings of affected functions now refer
to format-time-string instead of to Lisp manual, and
format-time-string's doc string covers time values.
* test/src/systime-tests.el (format-time-string-with-zone):
Check decode-time too.
(decode-then-encode-time, time-arith-tests): New tests.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/buffers.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 8789a8d56f6..b2a4b0eab1a 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -654,7 +654,7 @@ If the buffer has no recorded last modification time, this function | |||
| 654 | returns zero. This case occurs, for instance, if the buffer is not | 654 | returns zero. This case occurs, for instance, if the buffer is not |
| 655 | visiting a file or if the time has been explicitly cleared by | 655 | visiting a file or if the time has been explicitly cleared by |
| 656 | @code{clear-visited-file-modtime}. Note, however, that | 656 | @code{clear-visited-file-modtime}. Note, however, that |
| 657 | @code{visited-file-modtime} returns a list for some non-file buffers | 657 | @code{visited-file-modtime} returns a timestamp for some non-file buffers |
| 658 | too. For instance, in a Dired buffer listing a directory, it returns | 658 | too. For instance, in a Dired buffer listing a directory, it returns |
| 659 | the last modification time of that directory, as recorded by Dired. | 659 | the last modification time of that directory, as recorded by Dired. |
| 660 | 660 | ||
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index ea6915350e8..64c327c3809 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -1457,14 +1457,14 @@ seconds east of Greenwich. | |||
| 1457 | @var{dow} and @var{utcoff}. | 1457 | @var{dow} and @var{utcoff}. |
| 1458 | @end defun | 1458 | @end defun |
| 1459 | 1459 | ||
| 1460 | @defun encode-time time &optional form | 1460 | @defun encode-time &optional time form &rest obsolescent-arguments |
| 1461 | This function converts @var{time} to a Lisp timestamp. | 1461 | This function converts @var{time} to a Lisp timestamp. |
| 1462 | It can act as the inverse of @code{decode-time}. | 1462 | It can act as the inverse of @code{decode-time}. |
| 1463 | 1463 | ||
| 1464 | The first argument can be a Lisp time value such as @code{nil} for the | 1464 | The first argument can be a time value such as a number of seconds, a |
| 1465 | current time, a number of seconds, a pair @code{(@var{ticks} | 1465 | pair @code{(@var{ticks} . @var{hz})}, a list @code{(@var{high} |
| 1466 | . @var{hz})}, or a list @code{(@var{high} @var{low} @var{micro} | 1466 | @var{low} @var{micro} @var{pico})}, or @code{nil} (the default) for |
| 1467 | @var{pico})} (@pxref{Time of Day}). It can also be a list | 1467 | the current time (@pxref{Time of Day}). It can also be a list |
| 1468 | @code{(@var{second} @var{minute} @var{hour} @var{day} @var{month} | 1468 | @code{(@var{second} @var{minute} @var{hour} @var{day} @var{month} |
| 1469 | @var{year} @var{ignored} @var{dst} @var{zone})} that specifies a | 1469 | @var{year} @var{ignored} @var{dst} @var{zone})} that specifies a |
| 1470 | decoded time in the style of @code{decode-time}, so that | 1470 | decoded time in the style of @code{decode-time}, so that |
| @@ -1494,10 +1494,10 @@ or more arguments. The first six arguments @var{second}, | |||
| 1494 | specify most of the components of a decoded time. If there are more | 1494 | specify most of the components of a decoded time. If there are more |
| 1495 | than six arguments the @emph{last} argument is used as @var{zone} and | 1495 | than six arguments the @emph{last} argument is used as @var{zone} and |
| 1496 | any other extra arguments are ignored, so that @code{(apply | 1496 | any other extra arguments are ignored, so that @code{(apply |
| 1497 | 'encode-time (decode-time ...))} works; otherwise @var{zone} defaults | 1497 | #\\='encode-time (decode-time ...))} works; otherwise @var{zone} defaults |
| 1498 | to the current time zone rule (@pxref{Time Zone Rules}). The decoded | 1498 | to the current time zone rule (@pxref{Time Zone Rules}). The decoded |
| 1499 | time's @var{dst} component is treated as if it was @minus{}1, and | 1499 | time's @var{dst} component is treated as if it was @minus{}1, and |
| 1500 | @var{form} so it takes its default value. | 1500 | @var{form} takes its default value. |
| 1501 | 1501 | ||
| 1502 | Year numbers less than 100 are not treated specially. If you want them | 1502 | Year numbers less than 100 are not treated specially. If you want them |
| 1503 | to stand for years above 1900, or years above 2000, you must alter them | 1503 | to stand for years above 1900, or years above 2000, you must alter them |