GNU Emacs Lisp Reference Manual
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 current-time (see Time of Day) and
file-attributes (see File Attributes).
%-sequences which say to substitute parts of the time. Here is a
table of what the %-sequences mean:
%a
%A
%b
%B
%c
%x %X.
%C
%A, %B %e, %Y.
%d
%D
%m/%d/%y.
%e
%h
%b.
%H
%I
%j
%k
%l
%m
%M
%n
%p
AM or PM, as appropriate.
%r
%I:%M:%S %p.
%R
%H:%M.
%S
%t
%T
%H:%M:%S.
%U
%w
%W
%x
%D.
%X
%T.
%y
%Y
%Z
(seconds minutes hour day month year dow dst zone)
Here is what the elements mean:
t if daylight savings time is effect, otherwise nil.
Note that Common Lisp has different meanings for dow and zone.
decode-time. It converts seven
items of calendrical data into a time value. For the meanings of the
arguments, see the table above under decode-time.
Year numbers less than 100 are treated just like other year numbers. If
you want them to stand for years above 1900, you must alter them yourself
before you call encode-time.
The optional argument 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 current-time-zone) or an integer (as you
would get from decode-time). The specified zone is used without
any further alteration for daylight savings time.