Single Letter Expansions
Current Time
%c()
-
The current Unix epoch time in seconds. This is an unsigned decimal number.
%C()
-
The microsecond component of the current epoch time. This is an unsigned decimal number.
Note that creating a "fractional" time from an expansion like %c.%C
should only be used when creating strings, such as for logging. If
you need to calculate time differences, the time values should be left
as type date
, and then you can substract two dates to get a
time_delta
. That time_delta
can then be printed in an appropriate
precision and scale.
Request Time
%l()
-
The Unix timestamp of when the request was received. This is an unsigned decimal number, and returns an integer number of seconds since the Unix epoch.
This expansion is only useful where the time resolution is in seconds.
If more resolution is needed, the builtin
%time(…)
expansion should be used instead.
%Y()
-
Four-digit year when the request was received.
%m()
-
Numeric month when the request was received.
%d()
-
Numeric day of the month when the request was received.
%H()
-
Hour of the day when the request was received.
%G()
-
Minute component of the time when the request was received.
%e()
-
Second component of the time when the request was received.
%M()
-
Microsecond component of the time when the request was received.
%D()
-
Request date in the format
YYYYMMDD
. %S()
-
Request timestamp in SQL format,
YYYY-mmm-ddd HH:MM:SS
.
The date module should be used instead.
%t()
-
Request timestamp in ctime format,
Www Mmm dd HH:MM:SS YYYY
.
The date module should be used instead.
%T()
-
Request timestamp in ISO format,
YYYY-mm-ddTHH:MM:SS.000
.
The date module should be used instead.