File Modification Time
The last
modification time of a file can be
reported with flastmod
. This lets the client know
how fresh the data is that you are offering. The format of the output
is controlled by the timefmt
attribute of the
config
element. The default rules for
timefmt
are the same as for the C-library function
strftime(
)
,
except that the year is now shown in four-digit format to
cope with the Year 2000 problem. Win32 Apache is soon to be modified
to make it work in the same way as the Unix version.
Win32 users who do not have access to
Unix C manuals can consult the FreeBSD documentation at
http://www.freebsd.org, for
example:
% man strftime
(We have not included it here because it may well vary from system to system.)
The file time.shtml gives an example:
<!--#config errmsg="Bungled again!"--> <!--#config timefmt="%A %B %C, the %jth day of the year, %S seconds since the Epoch"--> The mod time of this file is <!--#flastmod virtual="size.shtml"--> The mod time of another_file is <!--#flastmod virtual="another_file"-->
This produces a response such as the following:
The mod time of this file is Tuesday August 19, the 240th day of the year, 841162166 seconds since the Epoch ...
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.