RT 3.6.4rc2

I’m pleased to announce the second release candidate of RT 3.6.4:

http://download.bestpractical.com/pub/rt/devel/rt-3.6.4rc2.tar.gz
http://download.bestpractical.com/pub/rt/devel/rt-3.6.4rc2.tar.gz.sig

MD5 (rt-3.6.4rc2.tar.gz) = 12578c66dde1a90067857a834b9edbc2
MD5 (rt-3.6.4rc2.tar.gz.sig) = a0fbc02145766e0b4b9c34cdd405e556

Changes:
several fixes from Nicholas,
back to fast searches by watchers (regression in rc1),
updated deps
"Log a notice when we choose not to redistribute autogenerated
messages"
$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.

(As a heads up, I’ll be pretty-much 100% offline from 20 June to 4
July. So if it doesn’t happen by 15 June or so, expect it not to
happen until July)

Jesse

PGP.sig (186 Bytes)

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.

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: lists.bestpractical.com Mailing Lists
rt-devel

PGP.sig (186 Bytes)

Hi Jesse,

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”;’

iann@elk:/usr/local/rt3.6.4rc2/lib/RT$ TZ=US/Eastern date
Fri Jun 15 07:07:34 EDT 2007
iann@elk:/usr/local/rt3.6.4rc2/lib/RT$ TZ=America/New_York date
Fri Jun 15 07:07:34 EDT 2007
iann@elk:/usr/local/rt3.6.4rc2/lib/RT$ perl -e’$ENV{TZ} = “US/Eastern”;
print localtime().“\n”;’
Fri Jun 15 07:07:36 2007
iann@elk:/usr/local/rt3.6.4rc2/lib/RT$ perl -e’ print localtime().“\n”;
$ENV{TZ} = “US/Eastern”; print localtime().“\n”;’
Fri Jun 15 11:07:36 2007
Fri Jun 15 11:07:36 2007

Regards, Ian.

perl -e’ print localtime().“\n”;
$ENV{TZ} = “US/Eastern”; print localtime().“\n”;’

Fascinating.

TZ=GMT perl -e’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”;
print localtime().“\n”;’

Mac OS X:

Fri Jun 15 12:50:55 2007
Fri Jun 15 08:50:55 2007

Linux:

Fri Jun 15 12:51:51 2007
Fri Jun 15 12:51:51 2007

Both 5.8.8.

I wonder what bit of cleverness I’m missing.

PGP.sig (186 Bytes)

Hmm, the obvious combinations work for me on centos 5.5…

[root@starbug2 ~]# TZ=GMT perl -e’ print localtime().“\n”;’
Fri Jun 15 12:58:10 2007
[root@starbug2 ~]# TZ=“US/Eastern” perl -e’ print localtime().“\n”;’
Fri Jun 15 08:58:21 2007
[root@starbug2 ~]# perl -e’ $ENV{TZ} = “GMT”; print localtime().“\n”;’
Fri Jun 15 12:59:08 2007
[root@starbug2 ~]# perl -e’ $ENV{TZ} = “US/Eastern”; print
localtime().“\n”;’
Fri Jun 15 08:59:15 2007
[

Kelly F. Hickel
Senior Software Architect
MQSoftware, Inc
952.345.8677
kfh@mqsoftware.com

works on my linux box:
TZ=GMT perl -e’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”; print
localtime().“\n”;’
Fri Jun 15 13:21:20 2007
Fri Jun 15 09:21:20 2007

I think this all depends on distribution and how good zone info package is.On 6/15/07, Jesse Vincent jesse@bestpractical.com wrote:

On Jun 15, 2007, at 7:08 AM, Norton, Ian wrote:

perl -e’ print localtime().“\n”;
$ENV{TZ} = “US/Eastern”; print localtime().“\n”;’

Fascinating.

TZ=GMT perl -e’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”;
print localtime().“\n”;’

Mac OS X:

Fri Jun 15 12:50:55 2007
Fri Jun 15 08:50:55 2007

Linux:

Fri Jun 15 12:51:51 2007
Fri Jun 15 12:51:51 2007

Both 5.8.8.

I wonder what bit of cleverness I’m missing.


List info: The rt-devel Archives

Best regards, Ruslan.

-----Original Message-----
From: rt-devel-bounces@lists.bestpractical.com [mailto:rt-devel-
bounces@lists.bestpractical.com] On Behalf Of Jesse Vincent
Sent: Friday, June 15, 2007 7:53 AM

Fascinating.

TZ=GMT perl -e’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”;
print localtime().“\n”;’

Mac OS X:

Fri Jun 15 12:50:55 2007
Fri Jun 15 08:50:55 2007

Linux:

Fri Jun 15 12:51:51 2007
Fri Jun 15 12:51:51 2007

Both 5.8.8.

I wonder what bit of cleverness I’m missing.

Hmm, the obvious combinations work for me on centos 5.5…

[root@starbug2 ~]# TZ=GMT perl -e’ print localtime().“\n”;’
Fri Jun 15 12:58:10 2007
[root@starbug2 ~]# TZ=“US/Eastern” perl -e’ print localtime().“\n”;’
Fri Jun 15 08:58:21 2007
[root@starbug2 ~]# perl -e’ $ENV{TZ} = “GMT”; print localtime().“\n”;’
Fri Jun 15 12:59:08 2007
[root@starbug2 ~]# perl -e’ $ENV{TZ} = “US/Eastern”; print
localtime().“\n”;’
Fri Jun 15 08:59:15 2007

There appear to be two things interacting here (at least in Jesse’s example)

On a FreeBSD machine that’s in GMT I see:

$ TZ=US/Mountain perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”; print localtime().“\n”;’
Fri Jun 15 13:31:51 2007
Fri Jun 15 13:31:51 2007
$ TZ=US/Eastern perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Mountain”; print localtime().“\n”;’
Fri Jun 15 13:31:54 2007
Fri Jun 15 13:31:54 2007

so TZ is getting ignored.

Whereas an Ubuntu machine recognises the TZ strings:

$ TZ=US/Eastern perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Mountain”; print localtime().“\n”;’
Fri Jun 15 09:32:56 2007
Fri Jun 15 09:32:56 2007
$ TZ=US/Mountain perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”; print localtime().“\n”;’
Fri Jun 15 07:33:00 2007
Fri Jun 15 07:33:00 2007

then both print out that timezone at initialisation time, and the subsequent
change is ignored.

So OS X must be doing something “special” and resetting the timezone for every
call to localtime. Note that GMT isn’t a great one to test with, as the
default for timezones you don’t understand is 0, which is GMT.

$ TZ=Europe/London perl -we’print gmtime() . “\n” . localtime().“\n”;’
Fri Jun 15 13:36:45 2007
Fri Jun 15 14:36:45 2007
$ TZ=US/Dubya perl -we’print gmtime() . “\n” . localtime().“\n”;’
Fri Jun 15 13:37:05 2007
Fri Jun 15 13:37:05 2007

And no, I don’t know more than this.

Nicholas Clark

-----Original Message-----
From: rt-devel-bounces@lists.bestpractical.com [mailto:rt-devel-
bounces@lists.bestpractical.com] On Behalf Of Jesse Vincent
Sent: Friday, June 15, 2007 7:53 AM

Fascinating.

TZ=GMT perl -e’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”;
print localtime().“\n”;’

Mac OS X:

Fri Jun 15 12:50:55 2007
Fri Jun 15 08:50:55 2007

Linux:

Fri Jun 15 12:51:51 2007
Fri Jun 15 12:51:51 2007

Both 5.8.8.

I wonder what bit of cleverness I’m missing.

Hmm, the obvious combinations work for me on centos 5.5…

[root@starbug2 ~]# TZ=GMT perl -e’ print localtime().“\n”;’
Fri Jun 15 12:58:10 2007
[root@starbug2 ~]# TZ=“US/Eastern” perl -e’ print localtime().“\n”;’
Fri Jun 15 08:58:21 2007
[root@starbug2 ~]# perl -e’ $ENV{TZ} = “GMT”; print localtime().“\n”;’
Fri Jun 15 12:59:08 2007
[root@starbug2 ~]# perl -e’ $ENV{TZ} = “US/Eastern”; print
localtime().“\n”;’
Fri Jun 15 08:59:15 2007

There appear to be two things interacting here (at least in Jesse’s example)
[snip]

so TZ is getting ignored.

Whereas an Ubuntu machine recognises the TZ strings:

$ TZ=US/Eastern perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Mountain”; print localtime().“\n”;’
Fri Jun 15 09:32:56 2007
Fri Jun 15 09:32:56 2007
$ TZ=US/Mountain perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”; print localtime().“\n”;’
Fri Jun 15 07:33:00 2007
Fri Jun 15 07:33:00 2007

then both print out that timezone at initialisation time, and the subsequent
change is ignored.
Gentoo linux (Europe/Moscow is default):
$ TZ=US/Mountain perl -we’ print localtime().“\n”; $ENV{TZ} =
“US/Eastern”; print localtime().“\n”;’
Fri Jun 15 07:44:55 2007
Fri Jun 15 09:44:55 2007
$ TZ=US/Eastern perl -we’ print localtime().“\n”; $ENV{TZ} =
“US/Mountain”; print localtime().“\n”;’
Fri Jun 15 09:45:09 2007
Fri Jun 15 07:45:09 2007

So not only MacOS is doing something special.

So OS X must be doing something “special” and resetting the timezone for every
call to localtime. Note that GMT isn’t a great one to test with, as the
default for timezones you don’t understand is 0, which is GMT.

[snip]

And no, I don’t know more than this.

Nicholas Clark

Best regards, Ruslan.

Hi,

Nicholas Clark wrote:

There appear to be two things interacting here (at least in Jesse’s example)

On a FreeBSD machine that’s in GMT I see:

$ TZ=US/Mountain perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”; print localtime().“\n”;’
Fri Jun 15 13:31:51 2007
Fri Jun 15 13:31:51 2007
$ TZ=US/Eastern perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Mountain”; print localtime().“\n”;’
Fri Jun 15 13:31:54 2007
Fri Jun 15 13:31:54 2007

so TZ is getting ignored.

That is because FreeBSD doesn’t have definitions for US/* timezones. If
you use e.g. perl -e’ print localtime().“\n”; $ENV{TZ} =
“America/New_York”; print localtime().“\n”;’
I (being in Germany) get:

Fri Jun 15 16:13:30 2007
Fri Jun 15 10:13:30 2007

Note there is no caching of the TZ variable (I have perl 5.8.7).

Whereas an Ubuntu machine recognises the TZ strings:

$ TZ=US/Eastern perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Mountain”; print localtime().“\n”;’
Fri Jun 15 09:32:56 2007
Fri Jun 15 09:32:56 2007
$ TZ=US/Mountain perl -we’ print localtime().“\n”; $ENV{TZ} =
“US/Eastern”; print localtime().“\n”;’
Fri Jun 15 07:33:00 2007
Fri Jun 15 07:33:00 2007

then both print out that timezone at initialisation time, and the
subsequent
change is ignored.

Those results (like the original requestor seems to be getting) on the
other hand look very strange to me. Apparently the TZ is being cached.

So OS X must be doing something “special” and resetting the timezone for every
call to localtime. Note that GMT isn’t a great one to test with, as the
default for timezones you don’t understand is 0, which is GMT.

I’m inclined to say Linux is doing something special/weird by caching
the TZ value.

And no, I don’t know more than this.

Me neither. Nor do I have a Linux box available to look for the cause.

Bye, Rolf.

Hello!

here my 2c

my test:

perl -we’print localtime().“\n”;$ENV{TZ} = “Europe/London”; print
localtime().“\n”;’

Solaris 10: different
Ubuntu 6.04: equal
SL4.4 (RHEL4): different
Suse8.2: different
Debian Sarge: equal

So because I find it funy I googled and found this one:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=48184
http://www.gnu.org/software/libc/FAQ.html#s-4.3

So for me it looks like TZ change is ignored in an running process
context (you can see this also with strace).

regards!

svenOn Fri, 2007-06-15 at 16:22 +0200, Rolf Grossmann wrote:

Hi,

Nicholas Clark wrote:

There appear to be two things interacting here (at least in Jesse’s example)

On a FreeBSD machine that’s in GMT I see:

$ TZ=US/Mountain perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Eastern”; print localtime().“\n”;’
Fri Jun 15 13:31:51 2007
Fri Jun 15 13:31:51 2007
$ TZ=US/Eastern perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Mountain”; print localtime().“\n”;’
Fri Jun 15 13:31:54 2007
Fri Jun 15 13:31:54 2007

so TZ is getting ignored.

That is because FreeBSD doesn’t have definitions for US/* timezones. If
you use e.g. perl -e’ print localtime().“\n”; $ENV{TZ} =
“America/New_York”; print localtime().“\n”;’
I (being in Germany) get:

Fri Jun 15 16:13:30 2007
Fri Jun 15 10:13:30 2007

Note there is no caching of the TZ variable (I have perl 5.8.7).

Whereas an Ubuntu machine recognises the TZ strings:

$ TZ=US/Eastern perl -we’ print localtime().“\n”; $ENV{TZ} = “US/Mountain”; print localtime().“\n”;’
Fri Jun 15 09:32:56 2007
Fri Jun 15 09:32:56 2007
$ TZ=US/Mountain perl -we’ print localtime().“\n”; $ENV{TZ} =
“US/Eastern”; print localtime().“\n”;’
Fri Jun 15 07:33:00 2007
Fri Jun 15 07:33:00 2007

then both print out that timezone at initialisation time, and the
subsequent
change is ignored.

Those results (like the original requestor seems to be getting) on the
other hand look very strange to me. Apparently the TZ is being cached.

So OS X must be doing something “special” and resetting the timezone for every
call to localtime. Note that GMT isn’t a great one to test with, as the
default for timezones you don’t understand is 0, which is GMT.

I’m inclined to say Linux is doing something special/weird by caching
the TZ value.

And no, I don’t know more than this.

Me neither. Nor do I have a Linux box available to look for the cause.

Bye, Rolf.


List info: The rt-devel Archives

On a FreeBSD machine that’s in GMT I see:

$ TZ=US/Mountain perl -we’ print localtime().“\n”; $ENV{TZ} = “US/
Eastern”; print localtime().“\n”;’
Fri Jun 15 13:31:51 2007
Fri Jun 15 13:31:51 2007
$ TZ=US/Eastern perl -we’ print localtime().“\n”; $ENV{TZ} = “US/
Mountain”; print localtime().“\n”;’
Fri Jun 15 13:31:54 2007
Fri Jun 15 13:31:54 2007

so TZ is getting ignored.

It is ignored because there is not US/Eastern timezone file on
FreeBSD. Peek in /usr/share/zoneinfo.

On the Mac, there is a US/Eastern file within /usr/share/zoneinfo.
I’m sure ubuntu has it as well.

This is why you have differences. The systems don’t know the names
of the zones you’re giving them.