Setting timezone for sub-hour offsets - e.g. India UTC +5:30

Moderator: crythias

Post Reply
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Setting timezone for sub-hour offsets - e.g. India UTC +5:30

Post by Mothra »

I am trying to create Calendar for our Offshore support team in India. Their Timezone is UTC +5:30. Unfortunately, Framework -> Core::Time::Calendarn will only allow timezone offset to be whole hours.

Is there a way to extend this without having to hack the perl scripts underneath?
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Setting timezone for sub-hour offsets - e.g. India UTC +

Post by crythias »

Unfortunately, no... not unless something drastically has changed since 3.2/3.3
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Re: Setting timezone for sub-hour offsets - e.g. India UTC +

Post by Mothra »

Ok... is there a way to do that *does* involve hacking the perl scripts underneath?

;-)
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Setting timezone for sub-hour offsets - e.g. India UTC +

Post by crythias »

Perhaps, but the intricacies of making it work ...
Start with something like Kernel/System/Time.pm

Code: Select all

            my $Zone = $Self->{ConfigObject}->Get( "TimeZone::Calendar" . $Param{Calendar} );
            if ($Zone) {
                $Zone             = $Zone * 3600;                # 60 * 60
                $Param{StartTime} = $Param{StartTime} + $Zone;
                $Param{StopTime}  = $Param{StopTime} + $Zone;
            }
and

Code: Select all

    if ( $Param{Calendar} ) {
        if ( $Self->{ConfigObject}->Get( "TimeZone::Calendar" . $Param{Calendar} . "Name" ) ) {
            $TimeWorkingHours
                = $Self->{ConfigObject}->Get( "TimeWorkingHours::Calendar" . $Param{Calendar} );
            $TimeVacationDays
                = $Self->{ConfigObject}->Get( "TimeVacationDays::Calendar" . $Param{Calendar} );
            $TimeVacationDaysOneTime = $Self->{ConfigObject}->Get(
                "TimeVacationDaysOneTime::Calendar" . $Param{Calendar}
            );
            $Zone = $Self->{ConfigObject}->Get( "TimeZone::Calendar" . $Param{Calendar} );
            $Zone = $Zone * 3600;                                                          # 60 * 60
            $Param{StartTime} = $Param{StartTime} + $Zone;
        }
    }
The "feel" seems to be that $Zone could be 5.5

Which ... You know, may be "fixable" from Config.pm

Code: Select all

$Self->{TimeZone} = '+5.5';
(May not be necessary unless server is running UTC)
and any of
$Self->{TimeZone::Calendarx} = "+5.5";
I can't vouch for this, but hey, it makes sense to me.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Re: Setting timezone for sub-hour offsets - e.g. India UTC +

Post by Mothra »

Ok thanks - I'll give this a go.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
Post Reply