[Rt-devel] RT 3.6.4rc2
Jesse Vincent
jesse at bestpractical.com
Thu Jun 14 13:47:06 EDT 2007
Can you give me (from the shell):
TZ=US/Eastern date
TZ=America/New_York date
perl -e'$ENV{TZ} = "US/Eastern"; print localtime()."\n";'
perl -e' print localtime()."\n"; $ENV{TZ} = "US/Eastern"; print
localtime()."\n";'
On Jun 14, 2007, at 12:35 PM, Norton, Ian wrote:
> Hi all,
>
>> $RT::Timezone should now actually work.
>>
>> I'd like to hear a couple success reports and confirmation
>> that we've fixed the regression in rc1 before rolling the
>> final next week.
>
> The timezone fix doesn't appear to be working for a test installation.
>
> The system timezone is set to GMT, with the RT Timezone set to
> "US/Eastern". Recording comments in a ticket shows them logged at the
> GMT time rather than the local timezone. By this we know that the
> database is correctly logging them at GMT but that the UI is not
> translating them for display.
>
> I *think* that the following sample code should illustrate the
> problem:
>
> --SNIP--
>
> #!/usr/bin/perl -w
>
> use strict;
> use lib "/usr/local/rt3.6.4rc2/lib";
> use RT;
>
> # Load config and init
> RT::LoadConfig();
> RT::Init();
>
> require "RT/Date.pm";
>
> # Create a date object and set it to now
> my $date = RT::Date->new(RT::SystemUser);
> $date->SetToNow();
>
> # timezone as defined by RT
> print("LocalTimezone - " . $date->LocalTimezone() . "\n");
>
> # timezone environment variable
> print("TZ Env var - " . $ENV{TZ} . "\n");
>
> # time AsString (Returns the object's time as a string with the
> current
> timezone)
> print("AsString - " . $date->AsString() . "\n");
>
> # localtime
> print("Localtime - " . localtime() . "\n");
>
> --SNIP--
>
> The results are this:
>
> LocalTimezone - US/Eastern
> TZ Env var - US/Eastern
> AsString - Thu Jun 14 16:14:15 2007
> Localtime - Thu Jun 14 16:14:15 2007
>
> Whilst I expect localtime to return the value it does, AsString
> returns
> the same value.
>
> Assuming this is a valid test which I accept it may not be, are there
> any suggestions on how to fix this please?
>
> We're using ubuntu 6.06 with perl 5.8.7 and My SQL 5.0.22.
>
> Thanks, Ian.
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/
> rt-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20070614/818a850e/PGP.pgp
More information about the Rt-devel
mailing list