| 1 | #!/usr/bin/perl -w |
| 2 | # Copyright (c) 2008-2026 Sullivan Beck. All rights reserved. |
| 3 | # This program is free software; you can redistribute it and/or modify it |
| 4 | # under the same terms as Perl itself. |
| 5 | |
| 6 | # We will store all critical dates for all past years, and years |
| 7 | # up to some point in the future. Critical dates past that year |
| 8 | # will be calculated on the fly. $keep_years is the number of |
| 9 | # years in the future which will be kept explicitly. |
| 10 | # |
| 11 | # This ensures that years in the near future can be accessed quickly, |
| 12 | # and that all years past a threshold are assumed to be static |
| 13 | # (with respect to how critical dates are calculated). |
| 14 | # |
| 15 | # This is the number of years in the future to keep. For testing |
| 16 | # purposes, we'll compare years beyond that to make sure that the |
| 17 | # critical dates are constant. This value ($test_years) must be |
| 18 | # greater than $keep_years. |
| 19 | |
| 20 | my($keep_years,$test_years); |
| 21 | $keep_years = 70; |
| 22 | $test_years = $keep_years + 10; |
| 23 | |
| 24 | $curr_year = (localtime)[5] + 1900; |
| 25 | $keep_year = $curr_year + $keep_years; |
| 26 | $test_year = $curr_year + $test_years; |
| 27 | |
| 28 | # Autogenerated module information |
| 29 | |
| 30 | $zones_pm = "lib/Date/Manip/Zones.pm"; |
| 31 | $zones_pod = $zones_pm; |
| 32 | $zones_pod =~ s/\.pm/.pod/; |
| 33 | $mod_dir = "lib/Date/Manip/TZ"; |
| 34 | $off_dir = "lib/Date/Manip/Offset"; |
| 35 | |
| 36 | # Most zones have a LAST RULE that includes exactly 1 ST (i.e. an offset |
| 37 | # of 00:00) and 1 DST (some other offset). |
| 38 | # |
| 39 | # The following zones are exceptions: |
| 40 | |
| 41 | %last_zone_offsets = |
| 42 | ( |
| 43 | # "America/Resolute" => { "dst" => 0, |
| 44 | # "st" => 2, }, |
| 45 | ); |
| 46 | |
| 47 | # The following zone(s) will not use a LAST RULE to calculate time zone |
| 48 | # changes past $keep_year. Instead, they will use all dates from a dump, |
| 49 | # and nothing beyond that. |
| 50 | # |
| 51 | # Asia/Jerusalem uses a non-standard way based on the Hebrew calendar. |
| 52 | |
| 53 | %no_last = map { $_,1 } qw(Asia/Jerusalem Asia/Tehran); |
| 54 | |
| 55 | 1; |
| 56 | |
| 57 | # Local Variables: |
| 58 | # mode: cperl |
| 59 | # indent-tabs-mode: nil |
| 60 | # cperl-indent-level: 3 |
| 61 | # cperl-continued-statement-offset: 2 |
| 62 | # cperl-continued-brace-offset: 0 |
| 63 | # cperl-brace-offset: 0 |
| 64 | # cperl-brace-imaginary-offset: 0 |
| 65 | # cperl-label-offset: 0 |
| 66 | # End: |