LocalTimePlugin is kind-of rewrite of LocalCityTimePlugin. I was unsatisfied with LocalCityTimePlugin (it has to connect to an external site to get the local time for a given city), so I wrote this Plugin to use the system's localtime functions. It works rather well, but doesn't do too much checking right now for a valid code. It won't die horribly if you give it a bad code, it just will give you a random time.
I use it for our systems diary here. Works quite well.
Syntax Rules
Add a %LOCALTIME% tag to your text to show the current time. You can specify the location or timezone such as "Asia/Tokyo" or "GMT" with %LOCALTIME{location}%, where location is a location mentioned at http://twiki.org/cgi-bin/xtra/tzdate, or a timezone code such as "JST".
This plugin can be used in combination with the CalendarPlugin, to get a localtime version of your appointments.
Your TWikiAdmin may need to add this plugin to the pluginsOrder to make sure it evaluates before CalendarPlugin.
to add a TWikiIrcMeeting add a line like
you can even define a USER Variable on your UserTopic, that sets a TimeZone variable, and replace the hardcoded Timezone with that variable.
LocalTimePlugin Global Settings
One line description:
Set SHORTDESCRIPTION = A plugin to give the current date and time of a particular city/timezone.
Debug plugin: (See output in data/debug.txt)
Set DEBUG = 0
Defaults:
Set TIMEZONE = Asia/Tokyo
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
Install the Date::Handler package from CPAN:
perl -MCPAN -e 'install Date::Handler'
Download the ZIP file from the Plugin web (see below)
Unzip LocalTimePlugin.zip in your twiki installation directory. Content: