{"id":17723598,"url":"https://github.com/doriantaylor/p5-datetime-timezone-ical","last_synced_at":"2025-03-31T13:41:47.760Z","repository":{"id":27888826,"uuid":"31380290","full_name":"doriantaylor/p5-datetime-timezone-ical","owner":"doriantaylor","description":"Generate DateTime::TimeZone-compatible objects from iCal VTIMEZONE content","archived":false,"fork":false,"pushed_at":"2018-05-25T16:42:29.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-12T10:11:35.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doriantaylor.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-26T17:51:07.000Z","updated_at":"2018-05-25T16:42:30.000Z","dependencies_parsed_at":"2022-09-01T05:52:34.142Z","dependency_job_id":null,"html_url":"https://github.com/doriantaylor/p5-datetime-timezone-ical","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doriantaylor%2Fp5-datetime-timezone-ical","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doriantaylor%2Fp5-datetime-timezone-ical/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doriantaylor%2Fp5-datetime-timezone-ical/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doriantaylor%2Fp5-datetime-timezone-ical/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doriantaylor","download_url":"https://codeload.github.com/doriantaylor/p5-datetime-timezone-ical/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246475866,"owners_count":20783741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-25T15:43:26.248Z","updated_at":"2025-03-31T13:41:47.734Z","avatar_url":"https://github.com/doriantaylor.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    DateTime::TimeZone::ICal - iCal VTIMEZONE entry to DateTime::TimeZone\n\nVERSION\n    Version 0.04\n\nSYNOPSIS\n        use Data::ICal;\n        use DateTime::Format::ICal;\n        use DateTime::TimeZone::ICal;\n\n        my $ical = Data::ICal-\u003enew(filename =\u003e 'foo.ics');\n\n        # generate a table of time zones\n        my (%tz, @events);\n        for my $entry (@{$ical-\u003eentries}) {\n            my $type = $entry-\u003eical_entry_type;\n            if ($type eq 'VTIMEZONE') {\n                my $dtz = DateTime::TimeZone::ICal-\u003efrom_ical_entry($entry);\n                $tz{$dtz-\u003ename} = $dtz;\n            }\n            elsif ($type eq 'VEVENT') {\n                push @events, $entry;\n            }\n            # ... handle other iCal objects ...\n         }\n\n         # now we can use this dictionary of time zones elsewhere:\n\n         for my $event (@events) {\n             # get a property that is a date\n             my ($dtstart) = @{$event-\u003eproperty('dtstart')};\n\n             # get the time zone key from the property parameters\n             my $tzid = $dtstart-\u003eparameters-\u003e{TZID};\n\n             # convert the date in the ordinary fashion\n             my $dt = DateTime::Format::ICal-\u003eparse_datetime($dtstart-\u003evalue);\n\n             # the datetime will be 'floating', therefore unaffected\n             $dt-\u003eset_time_zone($tz{$tzid}) if $tzid and $tz{$tzid};\n\n             # ... do other processing ...\n         }\n\nDESCRIPTION\n    Conforming iCal documents (RFC 5545\n    \u003chttps://tools.ietf.org/html/rfc5545\u003e) have three ways to represent\n    \"DATE-TIME\" values: UTC, local, and specified through the \"TZID\"\n    mechanism. \"TZID\" *parameters* in relevant properties are references to\n    the same \"TZID\" *property* in one of a list of \"VTIMEZONE\" objects,\n    where the information about UTC offsets and their recurrence is embedded\n    in the document.\n\n    In practice, many generators of iCal documents use, as \"TZID\" keys,\n    valid labels from the Olson database \u003chttp://www.iana.org/time-zones\u003e,\n    but others, notably Microsoft Outlook, do not. RFC 5545 explicitly\n    declines to specify a naming convention, so it is sometimes necessary to\n    construct the time zone offsets and daylight savings changes from the\n    \"VTIMEZONE\" data itself, rather than just inferring it from the name.\n    That's where this module comes in.\n\nMETHODS\n    The only differences in interface for this module are its constructor\n    and one method, \"from_ical_entry\". The rest of the interface should work\n    exactly the same way as DateTime::TimeZone, so please consult its\n    documentation for other functionality.\n\n    This module overrides the following methods:\n\n    *   name\n\n    *   category\n\n    *   is_floating\n\n    *   is_olson\n\n    *   offset_for_datetime\n\n    *   offset_for_local_datetime\n\n    *   is_dst_for_datetime\n\n    *   short_name_for_datetime\n\n    *   is_utc\n\n    *   has_dst_changes\n\n  new %PARAMS\n    The constructor has been modified to permit the assembly of a time zone\n    specification from piecemeal data. These are the following\n    initialization parameters:\n\n    tzid\n        This is the \"TZID\" of the iCal entry. Note that the accessor to\n        retrieve the value from an instantiated object is \"name\", for\n        congruence with DateTime::TimeZone.\n\n    standard\n        This is an \"ARRAY\" reference of DateTime::TimeZone::ICal::Spec\n        instances, or otherwise of \"HASH\" references congruent to that\n        module's constructor, which will be coerced into said objects. This\n        parameter is *required*, and there must be *at least* one member in\n        the \"ARRAY\".\n\n    daylight\n        Same deal but for Daylight Savings Time. This parameter is optional,\n        as is its contents.\n\n    In practice you may not need to ever use this constructor directly, but\n    it may come in handy for instances where you need to compose\n    non-standard time zone behaviour from scratch.\n\n  from_ical_entry $ENTRY [, $USE_DATA ]\n    This class method converts a Data::ICal::Entry object of type\n    \"VTIMEZONE\" into a DateTime::TimeZone::ICal object. It will \"croak\" if\n    the input is malformed, so wrap it in an \"eval\" or equivalent if you\n    expect that possibility.\n\n    This method attempts to check if an existing DateTime::TimeZone can be\n    instantiated from the \"TZID\", thus skipping over any local processing.\n    This behaviour can be overridden with the $USE_DATA flag.\n\nAUTHOR\n    Dorian Taylor, \"\u003cdorian at cpan.org\u003e\"\n\nBUGS\n    Please report any bugs or feature requests to\n    \"bug-datetime-timezone-ical at rt.cpan.org\", or through the web\n    interface at\n    \u003chttp://rt.cpan.org/NoAuth/ReportBug.html?Queue=DateTime-TimeZone-ICal\u003e.\n    I will be notified, and then you'll automatically be notified of\n    progress on your bug as I make changes.\n\nSUPPORT\n    You can find documentation for this module with the perldoc command.\n\n        perldoc DateTime::TimeZone::ICal\n\n    You can also look for information at:\n\n    *   RT: CPAN's request tracker (report bugs here)\n\n        \u003chttp://rt.cpan.org/NoAuth/Bugs.html?Dist=DateTime-TimeZone-ICal\u003e\n\n    *   AnnoCPAN: Annotated CPAN documentation\n\n        \u003chttp://annocpan.org/dist/DateTime-TimeZone-ICal\u003e\n\n    *   CPAN Ratings\n\n        \u003chttp://cpanratings.perl.org/d/DateTime-TimeZone-ICal\u003e\n\n    *   Search CPAN\n\n        \u003chttp://search.cpan.org/dist/DateTime-TimeZone-ICal/\u003e\n\nSEE ALSO\n    DateTime::TimeZone\n    DateTime::Format::ICal\n    Data::ICal\n    RFC 5545 \u003chttps://tools.ietf.org/html/rfc5545\u003e\n    IANA Time Zones (Olson Database) \u003chttp://www.iana.org/time-zones\u003e\n\nLICENSE AND COPYRIGHT\n    Copyright 2015 Dorian Taylor.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n    not use this file except in compliance with the License. You may obtain\n    a copy of the License at \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoriantaylor%2Fp5-datetime-timezone-ical","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoriantaylor%2Fp5-datetime-timezone-ical","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoriantaylor%2Fp5-datetime-timezone-ical/lists"}