X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FJSRPC.pm;h=3bea69a5405e5c14983503767410d1eaf2a28ea0;hb=eb3bda37d084c0e6b13c97f88f06d5563c40d2fb;hp=5515a2aecfa824fec3c5e4703b8855ce1be477f8;hpb=acd22833d74158d4b5320578987f372464bef7b7;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/JSRPC.pm b/lib/NDWeb/Controller/JSRPC.pm index 5515a2a..3bea69a 100644 --- a/lib/NDWeb/Controller/JSRPC.pm +++ b/lib/NDWeb/Controller/JSRPC.pm @@ -4,6 +4,8 @@ use strict; use warnings; use parent 'Catalyst::Controller'; +use DateTime::TimeZone; + =head1 NAME NDWeb::Controller::JSRPC - Catalyst Controller @@ -187,6 +189,13 @@ sub listTargets : Local { $c->forward('/listTargets'); } +sub tzcountries : Local { + my ($self, $c, $cat) = @_; + + my @countries = DateTime::TimeZone->names_in_category($cat); + $c->stash(tzcountries => \@countries); +} + sub access_denied : Private { my ($self, $c) = @_; $c->stash(template => 'jsrpc/access_denied.tt2');