+instead of the current time. The argument should have the same form
+as for @code{current-time-string} (see above). Thus, you can use
+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}.
+
+@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
+
+@node Time Conversion
+@section Time Conversion
+
+ These functions convert time values (lists of two or three integers)
+to strings or to calendrical information. There is also a function to
+convert calendrical information to a time value. You can get time
+values from the functions @code{current-time} (@pxref{Time of Day}) and
+@code{file-attributes} (@pxref{Definition of file-attributes}).
+
+Many operating systems are limited to time values that contain 32 bits
+of information; these systems typically handle only the times from
+1901-12-13 20:45:52 UTC through 2038-01-19 03:14:07 UTC. However, some
+operating systems have larger time values, and can represent times far
+in the past or future.
+
+Time conversion functions always use the Gregorian calendar, even for
+dates before the Gregorian calendar was introduced. Year numbers count
+the number of years since the year 1 B.C., and do not skip zero as
+traditional Gregorian years do; for example, the year number @minus{}37
+represents the Gregorian year 38 B.C@.
+
+@defun date-to-time string
+This function parses the time-string @var{string} and returns the
+corresponding time value.
+@end defun
+
+@defun format-time-string format-string &optional time universal
+This function converts @var{time} (or the current time, if @var{time} is
+omitted) to a string according to @var{format-string}. The argument
+@var{format-string} may contain @samp{%}-sequences which say to
+substitute parts of the time. Here is a table of what the
+@samp{%}-sequences mean:
+
+@table @samp
+@item %a
+This stands for the abbreviated name of the day of week.
+@item %A
+This stands for the full name of the day of week.
+@item %b
+This stands for the abbreviated name of the month.
+@item %B
+This stands for the full name of the month.
+@item %c
+This is a synonym for @samp{%x %X}.
+@item %C
+This has a locale-specific meaning. In the default locale (named C), it
+is equivalent to @samp{%A, %B %e, %Y}.
+@item %d
+This stands for the day of month, zero-padded.
+@item %D
+This is a synonym for @samp{%m/%d/%y}.
+@item %e
+This stands for the day of month, blank-padded.
+@item %h
+This is a synonym for @samp{%b}.
+@item %H
+This stands for the hour (00-23).
+@item %I
+This stands for the hour (01-12).
+@item %j
+This stands for the day of the year (001-366).
+@item %k
+This stands for the hour (0-23), blank padded.
+@item %l
+This stands for the hour (1-12), blank padded.
+@item %m
+This stands for the month (01-12).
+@item %M
+This stands for the minute (00-59).
+@item %n
+This stands for a newline.
+@item %p
+This stands for @samp{AM} or @samp{PM}, as appropriate.
+@item %r
+This is a synonym for @samp{%I:%M:%S %p}.
+@item %R
+This is a synonym for @samp{%H:%M}.
+@item %S
+This stands for the seconds (00-59).
+@item %t
+This stands for a tab character.
+@item %T
+This is a synonym for @samp{%H:%M:%S}.
+@item %U
+This stands for the week of the year (01-52), assuming that weeks
+start on Sunday.
+@item %w
+This stands for the numeric day of week (0-6). Sunday is day 0.
+@item %W
+This stands for the week of the year (01-52), assuming that weeks
+start on Monday.
+@item %x
+This has a locale-specific meaning. In the default locale (named
+@samp{C}), it is equivalent to @samp{%D}.
+@item %X
+This has a locale-specific meaning. In the default locale (named
+@samp{C}), it is equivalent to @samp{%T}.
+@item %y
+This stands for the year without century (00-99).
+@item %Y
+This stands for the year with century.
+@item %Z
+This stands for the time zone abbreviation.
+@end table
+
+You can also specify the field width and type of padding for any of
+these @samp{%}-sequences. This works as in @code{printf}: you write
+the field width as digits in the middle of a @samp{%}-sequences. If you
+start the field width with @samp{0}, it means to pad with zeros. If you
+start the field width with @samp{_}, it means to pad with spaces.
+
+For example, @samp{%S} specifies the number of seconds since the minute;
+@samp{%03S} means to pad this with zeros to 3 positions, @samp{%_3S} to
+pad with spaces to 3 positions. Plain @samp{%3S} pads with zeros,
+because that is how @samp{%S} normally pads to two positions.
+
+The characters @samp{E} and @samp{O} act as modifiers when used between
+@samp{%} and one of the letters in the table above. @samp{E} specifies
+using the current locale's ``alternative'' version of the date and time.
+In a Japanese locale, for example, @code{%Ex} might yield a date format
+based on the Japanese Emperors' reigns. @samp{E} is allowed in
+@samp{%Ec}, @samp{%EC}, @samp{%Ex}, @samp{%EX}, @samp{%Ey}, and
+@samp{%EY}.
+
+@samp{O} means to use the current locale's ``alternative''
+representation of numbers, instead of the ordinary decimal digits. This
+is allowed with most letters, all the ones that output numbers.
+
+If @var{universal} is non-@code{nil}, that means to describe the time as
+Universal Time; @code{nil} means describe it using what Emacs believes
+is the local time zone (see @code{current-time-zone}).
+
+This function uses the C library function @code{strftime} to do most of
+the work. In order to communicate with that function, it first encodes
+its argument using the coding system specified by
+@code{locale-coding-system} (@pxref{Locales}); after @code{strftime}
+returns the resulting string, @code{format-time-string} decodes the
+string using that same coding system.
+@end defun
+
+@defun seconds-to-time seconds
+This function converts @var{seconds}, a floating point number of
+seconds since the epoch, to a time value and returns that. To perform
+the inverse conversion, use @code{float-time}.
+@end defun
+
+@defun decode-time &optional time
+This function converts a time value into calendrical information. If
+you don't specify @var{time}, it decodes the current time. The return
+value is a list of nine elements, as follows:
+
+@example
+(@var{seconds} @var{minutes} @var{hour} @var{day} @var{month} @var{year} @var{dow} @var{dst} @var{zone})
+@end example
+
+Here is what the elements mean:
+
+@table @var
+@item seconds
+The number of seconds past the minute, as an integer between 0 and 59.
+On some operating systems, this is 60 for leap seconds.
+@item minutes
+The number of minutes past the hour, as an integer between 0 and 59.
+@item hour
+The hour of the day, as an integer between 0 and 23.
+@item day
+The day of the month, as an integer between 1 and 31.
+@item month
+The month of the year, as an integer between 1 and 12.
+@item year
+The year, an integer typically greater than 1900.
+@item dow
+The day of week, as an integer between 0 and 6, where 0 stands for
+Sunday.
+@item dst
+@code{t} if daylight savings time is effect, otherwise @code{nil}.
+@item zone
+An integer indicating the time zone, as the number of seconds east of
+Greenwich.
+@end table
+
+@strong{Common Lisp Note:} Common Lisp has different meanings for
+@var{dow} and @var{zone}.
+@end defun
+
+@defun encode-time seconds minutes hour day month year &optional zone
+This function is the inverse of @code{decode-time}. It converts seven
+items of calendrical data into a time value. For the meanings of the
+arguments, see the table above under @code{decode-time}.
+
+Year numbers less than 100 are not treated specially. If you want them
+to stand for years above 1900, or years above 2000, you must alter them
+yourself before you call @code{encode-time}.
+
+The optional argument @var{zone} defaults to the current time zone and
+its daylight savings time rules. If specified, it can be either a list
+(as you would get from @code{current-time-zone}), a string as in the
+@code{TZ} environment variable, @code{t} for Universal Time, or an
+integer (as you would get from @code{decode-time}). The specified
+zone is used without any further alteration for daylight savings time.
+
+If you pass more than seven arguments to @code{encode-time}, the first
+six are used as @var{seconds} through @var{year}, the last argument is
+used as @var{zone}, and the arguments in between are ignored. This
+feature makes it possible to use the elements of a list returned by
+@code{decode-time} as the arguments to @code{encode-time}, like this:
+
+@example
+(apply 'encode-time (decode-time @dots{}))
+@end example
+
+You can perform simple date arithmetic by using out-of-range values for
+the @var{seconds}, @var{minutes}, @var{hour}, @var{day}, and @var{month}
+arguments; for example, day 0 means the day preceding the given month.
+
+The operating system puts limits on the range of possible time values;
+if you try to encode a time that is out of range, an error results.
+For instance, years before 1970 do not work on some systems;
+on others, years as early as 1901 do work.
+@end defun
+
+@node Processor Run Time
+@section Processor Run time
+
+@defun get-internal-run-time
+This function returns the processor run time used by Emacs as a list
+of three integers: @code{(@var{high} @var{low} @var{microsec})}. The
+integers @var{high} and @var{low} combine to give the number of
+seconds, which is
+@ifnottex
+@var{high} * 2**16 + @var{low}.
+@end ifnottex
+@tex
+$high*2^{16}+low$.
+@end tex
+
+The third element, @var{microsec}, gives the microseconds (or 0 for
+systems that return time with the resolution of only one second).
+
+If the system doesn't provide a way to determine the processor run
+time, get-internal-run-time returns the same time as current-time.
+@end defun
+
+@node Time Calculations
+@section Time Calculations
+
+ These functions perform calendrical computations using time values
+(the kind of list that @code{current-time} returns).
+
+@defun time-less-p t1 t2
+This returns @code{t} if time value @var{t1} is less than time value
+@var{t2}.
+@end defun
+
+@defun time-subtract t1 t2
+This returns the time difference @var{t1} @minus{} @var{t2} between
+two time values, in the same format as a time value.
+@end defun
+
+@defun time-add t1 t2
+This returns the sum of two time values, one of which ought to
+represent a time difference rather than a point in time.
+Here is how to add a number of seconds to a time value:
+
+@example
+(time-add @var{time} (seconds-to-time @var{seconds}))
+@end example
+@end defun
+
+@defun time-to-days time
+This function returns the number of days between the beginning of year
+1 and @var{time}.
+@end defun
+
+@defun time-to-day-in-year time
+This returns the day number within the year corresponding to @var{time}.
+@end defun
+
+@defun date-leap-year-p year
+This function returns @code{t} if @var{year} is a leap year.