LocalCityTimePlugin
This plugin shows the local time of a city embedded in a TWiki topic. The current local time is taken from the Date and Time Gateway at
http://TWiki.org/cgi-bin/xtra/tzdate, or calculated internally.
Syntax Rules
Add the
%LOCALCITYTIME{"timezone"}%
variable anywhere in your topic.
"timezone"
is a Continent/City combination as defined in the Date and Time Gateway page.
Examples:
LocalCityTimePlugin Settings
Plugin settings are stored as preferences variables. To reference
a plugin setting write
%<plugin>_<setting>%
, i.e.
%LOCALCITYTIMEPLUGIN_SHORTDESCRIPTION%
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Shows the local time of a city embedded in a TWiki topic.
- Debug plugin: (See output in
data/debug.txt
)
- Use internal date command instead of Date and Time Gateway. This is faster, but depends on BSD / Linux style zoneinfo files and the
date
command:
Plugin Installation Instructions
- Download the ZIP file from the Plugin web (see below)
- Unzip
LocalCityTimePlugin.zip
in your twiki installation directory. Content: File: | Description: |
data/TWiki/LocalCityTimePlugin.txt | Plugin topic |
data/TWiki/LocalCityTimePlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/LocalCityTimePlugin.pm | Plugin Perl module |
- Check if the following
%LOCALCITYTIME{"Europe/Zurich"}%
works:
- Optionally enable internal date calculation with the
USEDATECOMMAND = 1
setting. This is faster then getting the data from the Date and Time Gateway page, but it depends on BSD / Linux style zoneinfo files and the date
command; configure the $tzDir
, $dateCmd
, $dateParam
settings in twiki/lib/TWiki/Plugins/LocalCityTimePlugin.pm
in case needed.
Plugin Info
Related Topics: TWikiPreferences,
TWikiPlugins,
TextFormattingRules
--
TWiki:Main/PeterThoeny - 19 Nov 2004