create new tag
, view all tags

LocalTimePluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on LocalTimePlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback for LocalTimePlugin

-- NathanOllerenshaw - 02 Jul 2003

I couldn't get this plugin to work. Setting DEBUG=1 did not write anything to $twiki/$datadir/debug.txt. There are no errors in the apache log file. I installed cpan Date::Handler.

Any suggestions for how to troubleshoot this?

Later: To get debugging to work I had to change the owner of LocalTimePlugin.pm to www-data (the debian apache user), chmod to 755, and restart Apache. However there are no error messages:

02 Jul 2003 - 02:46 - TWiki::Plugins::LocalTimePlugin::initPlugin( TWiki.LocalTimePlugin ) is OK
02 Jul 2003 - 02:46 - LocalTimePlugin::commonTagsHandler( TWiki.LocalTimePlugin )
02 Jul 2003 - 18:46 - LocalTimePlugin::commonTagsHandler( TWiki.LocalTimePlugin )
02 Jul 2003 - 18:46 - LocalTimePlugin::commonTagsHandler( TWiki.LocalTimePlugin )
02 Jul 2003 - 18:46 - LocalTimePlugin::commonTagsHandler( TWiki.LocalTimePlugin )
02 Jul 2003 - 18:46 - LocalTimePlugin::commonTagsHandler( TWiki.LocalTimePlugin )

Note the time jump between lines two and three.

Host system is Apache/1.3.27 (Unix) Debian GNU/Linux mod_auth_pam/1.1.1 mod_perl/1.27

-- MattWilkie - 02 Jul 2003

The Date and Time gateway URL has changed. The doc of this Plugin needs to be updated. See LocalCityTimePlugin for details.

The latest LocalCityTimePlugin version supports faster internal date calculation if enabled. This depends on the BSD / Linux style zoneinfo files and date command (instead of the Date::Handler like this Plugin does)

-- PeterThoeny - 24 Nov 2003

checked .zip into CVSplugins:LocalTimePlugin

-- WillNorris - 24 Nov 2004

I'm just updating this plugin to TWiki-4.0, and adding some extra support for displaying times in different zones - see svn until I publish it

see Bugs:Item1784

I'm also wondering if I shouldn't re-do it to use Class::Date rather than Date::Handler, as right now I have to use TWiki's particularly poor date parsing code. (Class::Date seems to have many more input options)

-- SvenDowideit - 05 Mar 2006

Just wonerding, what is the reason to maintain this Plugin? The LocalCityTimePlugin can handle time also internally.

-- PeterThoeny - 05 Mar 2006

well, for starters, LocalCityTimePlugin seems to me to require a unix environment, and does not use CPAN. Both these do not match with my, and my customers needs.

-- SvenDowideit - 05 Mar 2006

Sven, could you please fix the note in the Plugin topic: "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." This is not the case since Nov 2003, the LocalCityTimePlugin does internal date lookup (is configurable.)

Also, AFAIK, the LocalCityTimePlugin and LocalTimePlugin have exactly the same functionality. How about joining the efforts?

-- PeterThoeny - 23 Jul 2006

They might have similar functionality, but I'm working on the code that is easier to work on. I took a look at the other one, and realised that I don't have time to work out all the code.

LocalTimePlugin does have more functionality, as it is able to dynamically show the time in the timezone of the logged in user, or give the timezones of selected users. One of the reasons I made it, was to co-ordinate with others over timezones, so I have a list of users, and the local times where they are. When they move, and updated their details on their home page, that list is automatically up to date.

-- SvenDowideit - 24 Jul 2006

LocalTimePlugin doesn't seem to work that well. I can't get it to parse a simple time zone string, a la GMT+0530. I'm trying to display the time in san francisco and the time in bangalore in the same page, and there doesn't seem to be a simple way to do it. Also, the default of "Asia/Tokyo" doesn't make sense; why can the default be the local time known to my twiki server?

one more thing: the URL http://TWiki.org/cgi-bin/xtra/tzdate is perpetually down.

Judging from the dates on the feedback comments, it looks like these issues haven't gotten any attention in about a year.

Is there a working plugin that displays the (correct) time in different time zones in the same page?

-- DougTomm - 18 Jun 2007

The original LocalCityTimePlugin allows you to do that.

Not sure why tzdate is down, I need to investigate.

-- PeterThoeny - 20 Jun 2007

foswiki fixes need to be backported to this plugin.

-- TimotheLitt - 2010-04-13

Here's a 1-line script to generate a topic of legal timezone names for the local system. Change /usr/share/zoneinfo to match TZDIR - which can easily be found from man tzselect. Might be a useful thing to adapt to modify the plugin topic in the install.

find /usr/share/zoneinfo -type f |sort -t/ -k1 -k2 | sed -e'$!N;s/\n/ | /' -e'$!N;s/\n/ | /' -e'$!N;s/\n/ | /' -e's/^\(.*\)$/| \1 |/' -e's./usr/share/zoneinfo/..g' >data/Main/TimeZones.txt

-- TimotheLitt - 2010-04-13

Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r16 - 2010-04-13 - TimotheLitt
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.