TIP LocalCityTimePlugin is not installed on Foswiki.org.


This plugin shows the local time of a city embedded in a topic.

Requires BSD or Linux zoneinfo files and date command


Add the %LOCALCITYTIME{"timezone"}% macro anywhere in your topic. "timezone" is a Continent/City combination.


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 e.g. %LOCALCITYTIME{"Europe/Zurich"}%

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

If the installation worked, you should see expanded times below:
Europe/London %LOCALCITYTIME{"Europe/London"}%
America/Havana %LOCALCITYTIME{"America/Havana"}%
Asia/Tokyo %LOCALCITYTIME{"Asia/Tokyo"}%
Asia/Tel_Aviv %LOCALCITYTIME{"Asia/Tel_Aviv"}%


Author: Peter Thoeny 19 Nov 2004
Change History:  
18 Jul 2011: Make tolerant of no $TZ env var setting - Foswiki:Main.CrawfordCurrie
26 Apr 2010: Ported and rewritten to use a tag handler by Foswiki:Main.CrawfordCurrie. Simplified by dumping the gateway - that sort of service is better done using an AJAX component.
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
Home: http://foswiki.org/Extensions/LocalCityTimePlugin
Support: http://foswiki.org/Support/LocalCityTimePlugin

Topic attachments
I Attachment Action Size Date Who Comment
LocalCityTimePlugin.md5md5 LocalCityTimePlugin.md5 manage 180 bytes 18 Jul 2011 - 12:46 CrawfordCurrie  
LocalCityTimePlugin.sha1sha1 LocalCityTimePlugin.sha1 manage 204 bytes 18 Jul 2011 - 12:47 CrawfordCurrie  
LocalCityTimePlugin.tgztgz LocalCityTimePlugin.tgz manage 4 K 18 Jul 2011 - 12:46 CrawfordCurrie  
LocalCityTimePlugin.zipzip LocalCityTimePlugin.zip manage 5 K 18 Jul 2011 - 12:46 CrawfordCurrie  
LocalCityTimePlugin_installerEXT LocalCityTimePlugin_installer manage 4 K 18 Jul 2011 - 12:46 CrawfordCurrie  
Topic revision: r2 - 18 Jul 2011, CrawfordCurrie - This page was cached on 16 Feb 2017 - 13:31.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License