Touch
My main Revolution & On-Rev pages do not change often, because most changes are in the example stacks & scripts, whose listings are generated on the fly.
The problem with this is that the page then appears to be older than it's contents.
So I need a way to update a page's modification date even when it does not change.
This page is testing using the 'touch' shell command to do this.
Whenever this page is loaded or refreshed, it updates it's own modification date to the current date and time.
Before touching:
This script was last modified on: Sat, 28 Jan 2012 08:40:00 -0600 (Local time: Sun, 29 Jan 2012 00:40:00 +1000)
-rw-r--r-- 1 troz troz 1761 Jan 28 08:40 /home/troz/troz.net/onrev/samples/touch.irev
Using the shell command:
command: touch /home/troz/troz.net/onrev/samples/touch.irev
'touch' result: 0
After touching:
This script was last modified on: Sat, 4 Feb 2012 17:04:00 -0600 (Local time: Sun, 5 Feb 2012 09:04:00 +1000)
-rw-r--r-- 1 troz troz 1761 Feb 4 17:04 /home/troz/troz.net/onrev/samples/touch.irev
This has an interesting side-effect:
When I upload a file, I usually get a file date without a time e.g. Sep 14 2009
After using the 'touch' command, I get a proper date & time e.g. Sep 13 23:52
Allowing for time zones, it is currently 14:52 on Sep 14 for me, and 23:52 Sep 13 at the server.
Include files:
includes/moddate.irev