%LOCALCITYTIME{"timezone"}% variable anywhere in your topic. "timezone" is a Continent/City combination as defined in the Date and Time Gateway page.
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://TWiki.org/cgi-bin/xtra/tzdate, e.g. %LOCALCITYTIME{"Europe/Zurich"}% |
| Help: | %LOCALCITYTIME% |
LocalCityTimePlugin help: Write a Continent/City timezone code listed in http://TWiki.org/cgi-bin/xtra/tzdate, such as %LOCALCITYTIME{"Europe/Zurich"}% |
%<plugin>_<setting>%, i.e. %LOCALCITYTIMEPLUGIN_SHORTDESCRIPTION%
data/debug.txt) date command: 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 |
configure in your TWiki installation, and enable the plugin in the {Plugins} section.
%LOCALCITYTIME{"Europe/Zurich"}% works: 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 Author: | TWiki:Main.PeterThoeny |
| Copyright: | © 2001-2011 Peter Thoeny, © 2001-2011 TWiki:TWiki.TWikiContributor |
| License: | GPL (GNU General Public License) |
| Plugin Version: | 21742 (2011-07-13) |
| Change History: | |
| 2011-07-13: | TWikibug:Item6725: Change global package variables from "use vars" to "our" |
| 2010-08-01: | TWikibug:Item6530: Doc fixes; changing TWIKIWEB to SYSTEMWEB |
| 19 Nov 2004: | Minor code cleanup; added benchmarks |
| 23 Nov 2003: | New URL for gateway (www.bsdi.com is decommissioned); choice of internal date calculation |
| 14 Jul 2001: | Changed to plug & play |
| 26 Apr 2001: | initPlugin returns 1; fixed uninitialized value warning |
| 25 Apr 2001: | Initial version |
| CPAN Dependencies: | none |
| Other Dependencies: | If USEDATECOMMAND = 0: Format of Date and Time Gateway web page at http://TWiki.org/cgi-bin/xtra/tzdate Else: BSD or Linux zoneinfo files and date command |
| Perl Version: | 5.0 |
| TWiki:Plugins/Benchmark: | GoodStyle 99%, FormattedSearch 99%, LocalCityTimePlugin with internal date command 96%, without 55% |
| Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/LocalCityTimePlugin |
| Feedback: | http://TWiki.org/cgi-bin/view/Plugins/LocalCityTimePluginDev |
| Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/LocalCityTimePluginAppraisal |
| PackageForm | |
|---|---|
| TopicClassification | PluginPackage |
| TestedOnTWiki | 5.1, 5.0, 4.3, 4.2, 4.1, 4.0.0, 01 Sep 2004, 01 Feb 2003 |
| TestedOnOS | OsLinux, OsSolaris |
| ShouldRunOnOS | AnyOS |
| InstalledOnTWikiOrg | Yes |
| DemoUrl | |
| DevelopedInSVN | Yes |
| ModificationPolicy | PleaseFeelFreeToModify |
| RelatedTopics | |
| I | Attachment | Action | Size | Date | Who | Comment |
|---|---|---|---|---|---|---|
| |
LocalCityTimePlugin.md5 | manage | 0.2 K | 2011-07-14 - 06:43 | PeterThoeny | |
| |
LocalCityTimePlugin.tgz | manage | 5.2 K | 2011-07-14 - 06:43 | PeterThoeny | |
| |
LocalCityTimePlugin.zip | manage | 6.8 K | 2011-07-14 - 06:42 | PeterThoeny | |
| |
LocalCityTimePlugin_installer | manage | 3.4 K | 2011-07-14 - 06:43 | PeterThoeny |