[rt-users] Problem configuring RT Timezone

Ruslan Zakirov ruslan.zakirov at gmail.com
Tue Apr 27 13:20:08 EDT 2010


It's a typo in the code :( Replace ->RFC2822( @_ ); with ->RFC2822( %args );

On Tue, Apr 27, 2010 at 8:45 PM, Kim Covil <covilk at lmax.com> wrote:
> Thanks Ruslan,
>
> That fixed it for us.
>
> It has however revealed a different issue.
>
> The date formatter RFC2616 (HTTP) seems to be doing something strange with
> the timezone. From lib/RT/Date.pm:
>
> sub RFC2616 {
>    my $self = shift;
>    my %args = ( Date => 1, Time => 1,
>                 @_,
>                 Timezone => 'utc',
>                 Seconds => 1, DayOfWeek => 1,
>               );
>
>    my $res = $self->RFC2822( @_ );
>    $res =~ s/\s*[+-]\d\d\d\d$/ GMT/ if $args{'Time'};
>    return $res;
> }
>
> If RFC2822 returns an accurate timezone offset (+0100) this formatter seems
> to just strip it and add the letters GMT afterwards. So what we are seeing
> is that now timezone processing is correct using Europe/London we are seeing
> BST times (GMT+1) with the letters GMT after them which is incorrect.
>
> Regards,
>
> Kim
>
> On 27/04/10 17:10, Ruslan Zakirov wrote:
>>
>> Hello Kim,
>>
>> On Tue, Apr 27, 2010 at 6:02 PM, Kim Covil<covilk at lmax.com>  wrote:
>>>
>>> Hi Ruslan,
>>>
>>> Thanks for the response and apologies for the delay in replying. You are
>>> correct it does seem to be an issue with mod_perl and ENV being untied.
>>
>> That's it.
>>
>>> I found another reference to this issue here:
>>>
>>> http://aspn.activestate.com/ASPN/Mail/Message/perl-mod_perl/3594080
>>>
>>> What would be the suggested way of fixing this for our RT installation?
>>> Should I try and write a module as suggested in the above link to
>>> override
>>> the localtime functionality?
>>
>> Recently we discovered another issue with mod_perl and starting to
>> recommend "SetHandler modperl" instead of "SetHandler perl-script".
>> Just change the latter to the following:
>>
>> PerlOptions +GlobalRequest
>> SetHandler modperl
>>
>> This will fix issue with timezones on mod_perl 2.x and as well protect
>> you from other bug. Note that this only works with forking MPM
>> (usually it's default setup). For threaded MPMs I suggest to use
>> FastCGI.
>>
>> I suggest all people on mod_perl 2 to try it, it's sligtly faster as well.
>>
>>> Regards,
>>>
>>> Kim
>>
>
>
> The information in this e-mail and any attachment is confidential and is
> intended only for the named recipient(s). The e-mail may not be disclosed or
> used by any person other than the addressee, nor may it be copied in any
> way. If you are not a named recipient please notify the sender immediately
> and delete any copies of this message. Any unauthorized copying, disclosure
> or distribution of the material in this e-mail is strictly forbidden. Any
> view or opinions presented are solely those of the author and do not
> necessarily represent those of the company.
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>



-- 
Best regards, Ruslan.



More information about the rt-users mailing list