How to Use User Time Zones on Non-UTC Server? [SOLVED]

Moderator: crythias

Locked
reb00tz
Znuny newbie
Posts: 2
Joined: 24 Jun 2010, 05:31
Znuny Version: 2.4.7

How to Use User Time Zones on Non-UTC Server? [SOLVED]

Post by reb00tz »

Hi,

I've just set up a new 2.4.7 system, and discovered that even though SysConfig has the following set up for Core::Time:
  • TimeZone: +0 (disabled/unchecked)
  • TimeZoneUser: Yes
  • TimeZoneUserBrowserAutoOffset: No
I discovered the shared host I am using has "CDT" (i.e. GMT-5) as the timezone, whereas one of our offices are in AEST (GMT+10) and another is GMT+8; attempts to change the "TimeZone" setting to anything else (i.e. "+0" or "-5" or "+5") has no effect since the "TimeZoneUser" setting is set to "Yes".

Attempts to set the "TimeZone" to "+5" (i.e. follow the non-too-clear instructions/description) as the time "diff" shows the correct UTC time for the server if "TimeZoneUser" is unchecked/disabled. Obviously, as mentioned, once "TimeZoneUser" is checked/enabled, this "+5" offset is effectively "ignored" (which I believe is incorrect)?

Is there anyway to set the system to acknowledge (and therefore calculate proper time offsets) that the server is running in a system other than UTC?

Is this a "bug"? Or a known issue? Google and forum searches have turned up nothing.
Last edited by reb00tz on 05 Jul 2010, 03:38, edited 1 time in total.
reb00tz
Znuny newbie
Posts: 2
Joined: 24 Jun 2010, 05:31
Znuny Version: 2.4.7

Re: How to Use User Time Zones on Non-UTC Server? [SOLVED]

Post by reb00tz »

OK, I have managed to "fix" my own timezone problem, and it seems that since no one has posted anything else, I will post my code changes here...

Basically, I edited the timezone options and added timezone offsets to all available menus, including "worst-case" scenarios where a server is in -12 and the agent/user is in +14 (yes, there is a +14 timezone) and vice-versa (which explains the +26 and -26 offset).

The two files that requires editing are:
  • .../otrs/Kernel/Output/HTML/PreferencesTimeZone.pm, and
  • .../otrs/Kernel/Config/Files/Framework.xml
Please refer to my diff files as attached.

I hope this is useful for others. Meanwhile, if someone could post the code changes (I am new to CVS), that would be great (would be grateful if credits are attributed to me)...
You do not have the required permissions to view the files attached to this post.
Locked