cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Using an extension: Needs followup in Tasks

DateTimePlugin needs rationalisation and slight fix

So I installed DateTimePlugin this morning and noticed the following things:

Firstly, the installer complained about Foswiki::Plugins::DateTimePlugin does not define $Foswiki::Plugins::DateTimePlugin::VERSION My little understanding of "real" perl would lead to to think that the VERSION variable is mis-declared, perhaps using my instead of our as in other plugins...

Secondly, and more frustrating for me: Is {DateTimePlugin}{TimezoneOffset} the "best" way to go to get server time default output from this plugin? (I assume that is what it intends to do.) Surely using the {DisplayTimeValues} exposed through the localisation part of Configure( lib/LocalSite.cfg) would be a better way. It could be used in the Foswiki::Time::formatTime call about line 263 of DateTimeplugin.pm. Its doesn't seem to be a major coding issue - I can almost do it myself!!!... (I guess my question is: does this soundlike the way to do it.)

I only ask becasue I would tire really quickly of using %DATETIME{date="17 Sep 2018 - 23:35"}% all the time.

In any case, my reading of the current code is that {DateTimePlugin}{TimezoneOffset} is broken anyway in that is doesn't actually change anything as the lines at about 175 where $inc is set, should be about 6 lines down after the incHours is actually set based on {DateTimePlugin}{TimezoneOffset}

QuestionForm edit

Subject Using an extension
Extension DateTimePlugin
Version
Status Needs followup in Tasks
Topic revision: r2 - 24 Jun 2009, OliverKrueger - This page was cached on 17 Sep 2018 - 23:35.

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