This plugin shows the local time of a city embedded in a Superwaba topic. The current time is taken from the from http://www.bsdi.com/date web site.
Add the %LOCALCITYTIME{"timezone"}% variable anywhere in your topic. "timezone" is a Continent/City combination as defined in above mentioned web site.
Examples:
| What: | You type: | You get: (static text for demo) |
| Time in Zurich: | %LOCALCITYTIME{"Europe/Zurich"}% | Sun, 15 Jul 2001, 02:03:50 CEST (Europe/Zurich) |
| Incorrect timezone: | %LOCALCITYTIME{"Not/There"}% | LocalCityTimePlugin warning: Invalid Timezone. Use a Continent/City timezone code listed in http://www.bsdi.com/date, i.e. %LOCALCITYTIME{"Europe/Zurich"}% |
| Help: | %LOCALCITYTIME% | LocalCityTimePlugin help: Write a Continent/City timezone code listed in http://www.bsdi.com/date, i.e. %LOCALCITYTIME{"Europe/Zurich"}% |
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 Superwaba topic.
- Debug plugin: (See output in
data/debug.txt)
- 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 |
- Create a topic with text
%LOCALCITYTIME{"Europe/Zurich"}% to check if the installation was successful.
Related Topics: TWikiPreferences, TWikiPlugins, TextFormattingRules
-- PeterThoeny - 14 Jul 2001
|