When many authors from different countries use a wiki, it is annoying to see the date/time stamps in a single timezone, different from their own. For an author in Europe or in New Zealand, having the dates in the Dallas/TX timezone makes it hard to estimate when an edit was actually done.
The recipe rewrites the timestamps in RecentChanges pages and on page histories to show the time in the local timezone of each author. The original date/time string is moved to a tooltip/title and appears when the mouse cursor is positioned over the link.
For the changes from the last 24 hours, after the page entry, a "+" plus sign is appended. Clicking on it will fetch and display the authors and summaries of the changes to that page from the last 48 hours.
The recipe is now enabled on pmwiki.org, see for example Site.AllRecentChangesShort.
Copy localtimes.js to your pmwiki/pub directory. Add near the end of local/config.php such code:
Note that the installation code changed in version 20150906.
Note that LocalTimes has built-in the functionality of the recipe "Better RecentChanges" from TrackChanges, but you cannot have the two recipes at the same time. If you previously used TrackChanges, please remove its installation code from config.php.
You can configure the duration of the fetched page history.
In config.php, set
$LastTimesHours = 24; // 24 hours; default is 48
To disable the "+" plus button and the fetching of recent history, set this variable to 0:
$LastTimesHours = 0;
In a RecentChanges page, or in a Page History, you will see the timestamps in the local time zone of your operating system. Note that in RecentChanges, only pages modified after the installation of the recipe will have their timestamps localized.
Click on the "+" plus sign after a page entry to see its recent history.
The recipe expects the RecentChanges format to be in standard bulleted or numbered lists. Other formats are not supported, eg. Tables may produce unexpected results and errors.
If the skin has a <div id="wikitext"> block, the recipe will only scan links in it and will work faster. If the page heading has the class "pagetitle", the recipe will append the current local time to the heading in light gray. (The default pmwiki skin and many other skins contain these elements; you can check if your skin does.)
Change log / Release notes
See discussion at LocalTimes-Talk