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: Task filed

Is Extensions.LocalTimePlugin compatible with mod_perl?

I'm thinking LocalTimePlugin is not compatible with mod_perl but I'd like to confirm.

What I'm seeing is that LocalTimePlugin always returns server-local time regardless of the requested time zone. Back tracing the code, LocalTimePlugin relies on the Date::Handler CPAN module which in turn relies on the POSIX module which in turn relies on native c calls which in turn rely on environment variables to store timezone information. Date::Handler uses local $ENV[] constructs to temporarily set the timezone to the requested value for the duration of a POSIX call. Unfortunately, under mod_perl 2, %ENV is no longer tied to the underlying "c environment" so setting values in %ENV doesn't change the environment and the POSIX calls always see the original timezone setting.

Is that correct? If so, is there a work-around?

-- 18 Feb 2010 - BryanThale

good analysis - When I wrote this plugin I didn't use mod_perl, and atm I'm still mostly not :/

If you're able to code a patch - please do smile if not, we'll need to raise a task to remind me to poke it when the Girls give me a chance.

-- SvenDowideit - 18 Feb 2010

Opened Tasks.Item8757

-- BryanThale - 23 Mar 2010

QuestionForm edit

Subject Using an extension
Extension LocalTimePlugin
Version Foswiki 1.0.9
Status Task filed
Topic revision: r3 - 23 Mar 2010, BryanThale - This page was cached on 11 Mar 2018 - 15:15.

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