{"id":7118,"date":"2022-12-20T19:35:32","date_gmt":"2022-12-20T22:35:32","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/timezoneinfo-man3\/"},"modified":"2022-12-20T19:35:32","modified_gmt":"2022-12-20T22:35:32","slug":"timezoneinfo-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/timezoneinfo-man3\/","title":{"rendered":"Time::ZoneInfo (man3)"},"content":{"rendered":"<h1 align=\"center\">Time::ZoneInfo<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#METHODS\">METHODS<\/a><br \/> <a href=\"#ERRORS\">ERRORS<\/a><br \/> <a href=\"#CONTRIBUTIONS\">CONTRIBUTIONS<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Time::ZoneInfo \u2212 Perl extension for returning a list of Time Zones&#8230;<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">use Time::ZoneInfo; <br \/> my $zones = Time::ZoneInfo\u2212>new(); <br \/> foreach my $zone ($zones\u2212>zones) { <br \/> # print $zone\u2212>zone . &#8216; \u2212 &#8216; . $zone\u2212>offset . &#8220;n&#8221;; <br \/> print $zone . &#8220;n&#8221;; <br \/> } <br \/> if (my $zone = Time::ZoneInfo\u2212>current_zone) { <br \/> my ($latitude, $longitude) = $zones\u2212>latitude_longitude_sexagesimal($zone); <br \/> print &#8220;$zone: &#8220;, $zones\u2212>country($zone), &#8221; $latitude $longituden&#8221;; <br \/> }<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">An <small>OO<\/small> interface to accessing a list of timezones. This is useful if you want to provide an interface for your user to choose one of the available time zones.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Version 0.3.1 also gives the geolocalisation for a time zone.<\/p>\n<h2>METHODS <a name=\"METHODS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>new<\/b> <br \/> You can specify the zonetab file by passing in zonetab => \u2019file\/location\u2019<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>regions<\/b> <br \/> Return an array (or array ref) to the list of regions<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>zones ([region])<\/b> <br \/> Return zones (optionally just for one region)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>country (zone)<\/b> <br \/> Return the country associated with the given zone<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>current_zone<\/b> <br \/> Return the current zone configured<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>latitude_decimal(zone)<\/b> <br \/> Return the latitude for the given zone using decimal notation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>latitude_sexagesimal(zone)<\/b> <br \/> Return the latitude for the given zone using sexagesimal notation (eg: 51_30\u201930&#8243;N)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>longitude_decimal(zone)<\/b> <br \/> Return the longitude for the given zone using decimal notation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>longitude_sexagesimal(zone)<\/b> <br \/> Return the longitude for the given zone using sexagesimal notation (eg: 00_07\u201931&#8243;E)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>latitude_longitude_decimal(zone)<\/b> <br \/> Return a list of two elements: the latitude and longitude for the given zone using decimal notation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>latitude_longitude_sexagesimal(zone)<\/b> <br \/> Return a list of two elements: the latitude and longitude for the given zone using sexagesimal notation (eg: 51_30\u201930&#8243;N and 00_07\u201931&#8243;E)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">=<\/p>\n<h2>ERRORS <a name=\"ERRORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">You can read $Time::ZoneInfo::ERROR for an error message at any time.<\/p>\n<h2>CONTRIBUTIONS <a name=\"CONTRIBUTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Thanks to Richard Carver <cpan.org\u2212rnc@thecarverzone.com> for finding issues processing comments.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Pascal &#8220;Pixel&#8221; Rigaux added geolocalisation<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Scot Penrose, <scott@cpan.org><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Time::ZoneInfo \u2212 Perl extension for returning a list of Time Zones&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3457],"class_list":["post-7118","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-timezoneinfo"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7118"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7118\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}