[rt-users] Is a time zone user preference available?

Eli Guzman eguzman at cvimellesgriot.com
Wed Apr 20 18:28:24 EDT 2011


----Original Message----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Kevin
Falcone Sent: Wednesday, April 20, 2011 2:44 PM To:
rt-users at lists.bestpractical.com Subject: Re: [rt-users] Is a time zone
user preference available? 

> On Wed, Apr 20, 2011 at 02:14:29PM -0600, Eli Guzman wrote:
>>>> http://min.us/mDnN4uxnfqIBg#1
>>> 
>>> You've neglected to say:
>>> 
>>> What you set it to in About Me.
>>> What time you expect to see.
>>> 
>>> I see something roughly 2 hours behind the current time, so assume
>>> it is showing in Mountain time
>>> 
>>> -kevin
>> 
>> Yes you are correct, it is showing that it is currently set Mountain
>> TZ (which was what the RT_SiteConfig was set to), and I went ahead
>> and changed the preference under the about me section to
>> 'Europe/London +0100', but for some reason the change has not taken
>> effect. 
> 
> Changing timezones for me and saving and then navigating to a ticket
> display page changes it for me locally.  You can always try logging
> out and back in if you suspect something wacky in your sessions.  
> 
>> Just not sure as to why, could this perhaps be related to the
>> database itself? Currently MySQL should be getting TZ data from the
>> OS itself, but I believe I can hard-set it in the my.ini file, not
>> sure if this is the preferred method for RT/or to be honest if it
>> should matter if the DB should be set to a specific TZ.
> 
> RT stores all data in UTC in the database, if it isn't doing that,
> you may have problems. 
> 
> -kevin

Hey Kevin,

Thanks for the input, I checked MySQL and the database is currently
using the system time:

mysql -u root mysql -e "select distinct @@system_time_zone from user"

+--------------------+
| @@system_time_zone |
+--------------------+
| MDT                |
+--------------------+

So it looks as if the DB itself is using MDT for processing
transactional data.

> RT stores all data in UTC in the database, if it isn't doing that,
> you may have problems.

So the question here would be, should I just set MySQL to run using UTC?

One thing I also noticed was the database output for one of the very
last transactions:

mysql> select id, LastUpdated from `rt3`.`Tickets` where id = '37464';

+-------+---------------------+
| id    | LastUpdated         |
+-------+---------------------+
| 37464 | 2011-04-20 22:17:12 |
+-------+---------------------+
1 row in set (0.00 sec)

On the interface it shows the time as MDT (16:17:12), but on the
database it looks as if it is storing everything as UTC as you
mentioned. I have cleared the cache and mason_data out of tracker,
logged out of the interface and logged back in, and there has still been
no change to the TZ. 

So I am at a bit of an impasse, it looks like RT is storing in UTC, but
the DB time is set for MDT (as per the system). Could forcing the DB to
use UTC solve the issue?

Thanks,
Eli




More information about the rt-users mailing list