X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FSelectTimezone;h=2520c0c36f2d956d48a467db554e4a28418107cd;hp=5ff603e243a489404488b4f9d691707582d4fb6b;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941 diff --git a/rt/share/html/Elements/SelectTimezone b/rt/share/html/Elements/SelectTimezone index 5ff603e24..2520c0c36 100644 --- a/rt/share/html/Elements/SelectTimezone +++ b/rt/share/html/Elements/SelectTimezone @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,26 +46,18 @@ %# %# END BPS TAGGED BLOCK }}} <%ONCE> -my $HAS_DATETIME_TZ = eval { require DateTime::TimeZone }; -my $HAS_DATETIME = eval { require DateTime }; +use DateTime; -my (@names, %label); -if ( $HAS_DATETIME_TZ ) { - @names = DateTime::TimeZone->all_names; -} +my @names = DateTime::TimeZone->all_names; -if ( $HAS_DATETIME ) { - my $dt = DateTime->now; - for ( @names ) { - $dt->set_time_zone( $_ ); - $label{$_} = $_ . ' ' . $dt->strftime('%z'); - } +my %label; +my $dt = DateTime->now; +for ( @names ) { + $dt->set_time_zone( $_ ); + $label{$_} = $_ . ' ' . $dt->strftime('%z'); } -% unless ( $HAS_DATETIME_TZ && @names ) { - -% } else { -% } <%ARGS> $ShowNullOption => 1 $Name => undef