[rt-users] Timezone Help Needed

Bruce Campbell bruce_campbell at ripe.net
Fri Nov 29 04:36:11 EST 2002


On Thu, 28 Nov 2002, Camron W. Fox wrote:

> On Thu, 28 Nov 2002, Bruce Campbell wrote:
>
> > On Thu, 28 Nov 2002, Greg Elisara wrote:
> >
> > > I'm getting weird timestamps in rt2 (running on Linux RH8). I'm in Auckland,
> > > New Zealand (GMT +12). I have set the timezone setting in config.pm to
> > > 'NZDT', which I believe linux understands (at least "date" returns in NZDT,
> > > eg Tue Nov 26 09:43:12 NZDT 2002) but in RT the timestamp seems to be for
> > > GMT.
> >
> > You're referring to things like the Search page displaying dates in GMT
> > (eg:  Search Criteria ... Created > 2002-07-31 22:00:00 GMT), yes?
> >
> > RT will always _store_ dates in GMT/UTC format, and you really don't want
> > to change the _storage_ of the dates.
> >
> 	Have you figured out a way to avoid having to convert times
> from $LOCALTIME to GMT every time you want to search by time?

As per my previous mail, the conversion is needed every time as RT stores
dates in GMT internally.  You really don't want to change the storage of
dates within RT.  If you do want to change this, keep in mind that you
then have to deal with daylight savings time adjustments yourself, rather
than letting your system deal with it as part of time conversion.

As per my previous mail, the display of dates in the search page is
currently in GMT, probably due to a small oversight.

As per my previous mail, you can change a small section of code which puts
the human-readable description of a date-dependent search into your local
timezone, if RT knows what your local timezone.

What was not in my previous mail, but I'm sure that you have found out by
experimentation, is that RT accepts date input (in the search page) in the
local timezone, and just displays the equivilant time in GMT .

Regards,

-- 
                             Bruce Campbell                            RIPE
                   Systems/Network Engineer                             NCC
                 www.ripe.net - PGP562C8B1B             Operations/Security






More information about the rt-users mailing list