Mercurial > emacs
comparison lispref/os.texi @ 72370:18daa6c46ee7
(Time Parsing): Add %z to format-time-string, per docstring.
Add cross reference to glibc manual for strftime.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 12 Aug 2006 12:55:07 +0000 |
parents | 7897e1c15087 |
children | 2a80ec1d7c00 7f3f771c85fa |
comparison
equal
deleted
inserted
replaced
72369:479403e5eb4e | 72370:18daa6c46ee7 |
---|---|
1254 @item %y | 1254 @item %y |
1255 This stands for the year without century (00-99). | 1255 This stands for the year without century (00-99). |
1256 @item %Y | 1256 @item %Y |
1257 This stands for the year with century. | 1257 This stands for the year with century. |
1258 @item %Z | 1258 @item %Z |
1259 This stands for the time zone abbreviation. | 1259 This stands for the time zone abbreviation (e.g., @samp{EST}). |
1260 @item %z | |
1261 This stands for the time zone numerical offset (e.g., @samp{-0500}). | |
1260 @end table | 1262 @end table |
1261 | 1263 |
1262 You can also specify the field width and type of padding for any of | 1264 You can also specify the field width and type of padding for any of |
1263 these @samp{%}-sequences. This works as in @code{printf}: you write | 1265 these @samp{%}-sequences. This works as in @code{printf}: you write |
1264 the field width as digits in the middle of a @samp{%}-sequences. If you | 1266 the field width as digits in the middle of a @samp{%}-sequences. If you |
1284 | 1286 |
1285 If @var{universal} is non-@code{nil}, that means to describe the time as | 1287 If @var{universal} is non-@code{nil}, that means to describe the time as |
1286 Universal Time; @code{nil} means describe it using what Emacs believes | 1288 Universal Time; @code{nil} means describe it using what Emacs believes |
1287 is the local time zone (see @code{current-time-zone}). | 1289 is the local time zone (see @code{current-time-zone}). |
1288 | 1290 |
1289 This function uses the C library function @code{strftime} to do most of | 1291 This function uses the C library function @code{strftime} |
1290 the work. In order to communicate with that function, it first encodes | 1292 (@pxref{Formatting Calendar Time,,, libc, The GNU C Library Reference |
1291 its argument using the coding system specified by | 1293 Manual}) to do most of the work. In order to communicate with that |
1292 @code{locale-coding-system} (@pxref{Locales}); after @code{strftime} | 1294 function, it first encodes its argument using the coding system |
1293 returns the resulting string, @code{format-time-string} decodes the | 1295 specified by @code{locale-coding-system} (@pxref{Locales}); after |
1294 string using that same coding system. | 1296 @code{strftime} returns the resulting string, |
1297 @code{format-time-string} decodes the string using that same coding | |
1298 system. | |
1295 @end defun | 1299 @end defun |
1296 | 1300 |
1297 @defun seconds-to-time seconds | 1301 @defun seconds-to-time seconds |
1298 This function converts @var{seconds}, a floating point number of | 1302 This function converts @var{seconds}, a floating point number of |
1299 seconds since the epoch, to a time value and returns that. To perform | 1303 seconds since the epoch, to a time value and returns that. To perform |