Change our to accessor function
parent
d6cca812df
commit
8aa0d47817
|
@ -28,7 +28,7 @@ triggers any => qw(in into to);
|
|||
zci is_cached => 1;
|
||||
zci answer_type => 'timezone_converter';
|
||||
|
||||
my %timezones = %DDG::GoodieRole::Dates::tz_offsets;
|
||||
my %timezones = DDG::GoodieRole::Dates::get_timezones();
|
||||
|
||||
my $default_tz = 'UTC';
|
||||
my $localtime_re = qr/(?:(?:my|local|my local)\s*time(?:zone)?)/i;
|
||||
|
|
|
@ -60,7 +60,7 @@ my $ambiguous_dates_matches = qr#^(?<m>$date_number)$date_delim(?<d>$date_number
|
|||
my $number_suffixes = qr#(?:st|nd|rd|th)#i;
|
||||
|
||||
# Timezones: https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations
|
||||
our %tz_offsets = (
|
||||
my %tz_offsets = (
|
||||
ACDT => '+1030',
|
||||
ACST => '+0930',
|
||||
ACT => '+0800',
|
||||
|
@ -409,6 +409,10 @@ sub parse_all_datestrings_to_date {
|
|||
return @dates_to_return;
|
||||
}
|
||||
|
||||
sub get_timezones {
|
||||
return %tz_offsets;
|
||||
}
|
||||
|
||||
sub _get_timezone {
|
||||
my $default_tz = 'UTC'; # If any of the below fails for some reason, we'll go with this
|
||||
|
||||
|
|
Loading…
Reference in New Issue