tzinfo 1.2.9 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +1 -3
  3. data.tar.gz.sig +0 -0
  4. data/.yardopts +3 -0
  5. data/CHANGES.md +469 -415
  6. data/LICENSE +13 -13
  7. data/README.md +368 -114
  8. data/lib/tzinfo.rb +60 -40
  9. data/lib/tzinfo/country.rb +131 -129
  10. data/lib/tzinfo/country_timezone.rb +70 -112
  11. data/lib/tzinfo/data_source.rb +389 -144
  12. data/lib/tzinfo/data_sources.rb +8 -0
  13. data/lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb +56 -0
  14. data/lib/tzinfo/data_sources/country_info.rb +42 -0
  15. data/lib/tzinfo/data_sources/data_timezone_info.rb +91 -0
  16. data/lib/tzinfo/data_sources/linked_timezone_info.rb +33 -0
  17. data/lib/tzinfo/data_sources/ruby_data_source.rb +141 -0
  18. data/lib/tzinfo/data_sources/timezone_info.rb +47 -0
  19. data/lib/tzinfo/data_sources/transitions_data_timezone_info.rb +214 -0
  20. data/lib/tzinfo/data_sources/zoneinfo_data_source.rb +573 -0
  21. data/lib/tzinfo/data_sources/zoneinfo_reader.rb +284 -0
  22. data/lib/tzinfo/data_timezone.rb +33 -47
  23. data/lib/tzinfo/datetime_with_offset.rb +153 -0
  24. data/lib/tzinfo/format1.rb +10 -0
  25. data/lib/tzinfo/format1/country_definer.rb +17 -0
  26. data/lib/tzinfo/format1/country_index_definition.rb +64 -0
  27. data/lib/tzinfo/format1/timezone_definer.rb +64 -0
  28. data/lib/tzinfo/format1/timezone_definition.rb +39 -0
  29. data/lib/tzinfo/format1/timezone_index_definition.rb +77 -0
  30. data/lib/tzinfo/format2.rb +10 -0
  31. data/lib/tzinfo/format2/country_definer.rb +68 -0
  32. data/lib/tzinfo/format2/country_index_definer.rb +68 -0
  33. data/lib/tzinfo/format2/country_index_definition.rb +46 -0
  34. data/lib/tzinfo/format2/timezone_definer.rb +94 -0
  35. data/lib/tzinfo/format2/timezone_definition.rb +73 -0
  36. data/lib/tzinfo/format2/timezone_index_definer.rb +45 -0
  37. data/lib/tzinfo/format2/timezone_index_definition.rb +55 -0
  38. data/lib/tzinfo/info_timezone.rb +26 -21
  39. data/lib/tzinfo/linked_timezone.rb +33 -52
  40. data/lib/tzinfo/offset_timezone_period.rb +42 -0
  41. data/lib/tzinfo/string_deduper.rb +118 -0
  42. data/lib/tzinfo/time_with_offset.rb +128 -0
  43. data/lib/tzinfo/timestamp.rb +548 -0
  44. data/lib/tzinfo/timestamp_with_offset.rb +85 -0
  45. data/lib/tzinfo/timezone.rb +979 -502
  46. data/lib/tzinfo/timezone_offset.rb +84 -74
  47. data/lib/tzinfo/timezone_period.rb +151 -217
  48. data/lib/tzinfo/timezone_proxy.rb +70 -79
  49. data/lib/tzinfo/timezone_transition.rb +77 -109
  50. data/lib/tzinfo/transitions_timezone_period.rb +63 -0
  51. data/lib/tzinfo/version.rb +7 -0
  52. data/lib/tzinfo/with_offset.rb +61 -0
  53. metadata +51 -114
  54. metadata.gz.sig +0 -0
  55. data/Rakefile +0 -107
  56. data/lib/tzinfo/annual_rules.rb +0 -51
  57. data/lib/tzinfo/country_index_definition.rb +0 -31
  58. data/lib/tzinfo/country_info.rb +0 -42
  59. data/lib/tzinfo/data_timezone_info.rb +0 -55
  60. data/lib/tzinfo/linked_timezone_info.rb +0 -26
  61. data/lib/tzinfo/offset_rationals.rb +0 -77
  62. data/lib/tzinfo/posix_time_zone_parser.rb +0 -136
  63. data/lib/tzinfo/ruby_core_support.rb +0 -169
  64. data/lib/tzinfo/ruby_country_info.rb +0 -74
  65. data/lib/tzinfo/ruby_data_source.rb +0 -140
  66. data/lib/tzinfo/time_or_datetime.rb +0 -351
  67. data/lib/tzinfo/timezone_definition.rb +0 -36
  68. data/lib/tzinfo/timezone_index_definition.rb +0 -54
  69. data/lib/tzinfo/timezone_info.rb +0 -30
  70. data/lib/tzinfo/timezone_transition_definition.rb +0 -104
  71. data/lib/tzinfo/transition_data_timezone_info.rb +0 -274
  72. data/lib/tzinfo/transition_rule.rb +0 -325
  73. data/lib/tzinfo/zoneinfo_country_info.rb +0 -37
  74. data/lib/tzinfo/zoneinfo_data_source.rb +0 -497
  75. data/lib/tzinfo/zoneinfo_timezone_info.rb +0 -520
  76. data/test/tc_annual_rules.rb +0 -95
  77. data/test/tc_country.rb +0 -238
  78. data/test/tc_country_index_definition.rb +0 -69
  79. data/test/tc_country_info.rb +0 -16
  80. data/test/tc_country_timezone.rb +0 -173
  81. data/test/tc_data_source.rb +0 -218
  82. data/test/tc_data_timezone.rb +0 -99
  83. data/test/tc_data_timezone_info.rb +0 -18
  84. data/test/tc_info_timezone.rb +0 -34
  85. data/test/tc_linked_timezone.rb +0 -155
  86. data/test/tc_linked_timezone_info.rb +0 -23
  87. data/test/tc_offset_rationals.rb +0 -23
  88. data/test/tc_posix_time_zone_parser.rb +0 -261
  89. data/test/tc_ruby_core_support.rb +0 -168
  90. data/test/tc_ruby_country_info.rb +0 -110
  91. data/test/tc_ruby_data_source.rb +0 -167
  92. data/test/tc_time_or_datetime.rb +0 -674
  93. data/test/tc_timezone.rb +0 -1361
  94. data/test/tc_timezone_definition.rb +0 -113
  95. data/test/tc_timezone_index_definition.rb +0 -73
  96. data/test/tc_timezone_info.rb +0 -11
  97. data/test/tc_timezone_london.rb +0 -143
  98. data/test/tc_timezone_melbourne.rb +0 -142
  99. data/test/tc_timezone_new_york.rb +0 -142
  100. data/test/tc_timezone_offset.rb +0 -126
  101. data/test/tc_timezone_period.rb +0 -555
  102. data/test/tc_timezone_proxy.rb +0 -136
  103. data/test/tc_timezone_transition.rb +0 -366
  104. data/test/tc_timezone_transition_definition.rb +0 -295
  105. data/test/tc_timezone_utc.rb +0 -27
  106. data/test/tc_transition_data_timezone_info.rb +0 -433
  107. data/test/tc_transition_rule.rb +0 -663
  108. data/test/tc_zoneinfo_country_info.rb +0 -78
  109. data/test/tc_zoneinfo_data_source.rb +0 -1204
  110. data/test/tc_zoneinfo_timezone_info.rb +0 -2153
  111. data/test/test_utils.rb +0 -192
  112. data/test/ts_all.rb +0 -7
  113. data/test/ts_all_ruby.rb +0 -5
  114. data/test/ts_all_zoneinfo.rb +0 -9
  115. data/test/tzinfo-data/tzinfo/data.rb +0 -8
  116. data/test/tzinfo-data/tzinfo/data/definitions/America/Argentina/Buenos_Aires.rb +0 -89
  117. data/test/tzinfo-data/tzinfo/data/definitions/America/New_York.rb +0 -327
  118. data/test/tzinfo-data/tzinfo/data/definitions/Australia/Melbourne.rb +0 -230
  119. data/test/tzinfo-data/tzinfo/data/definitions/EST.rb +0 -19
  120. data/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__m__1.rb +0 -21
  121. data/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__p__1.rb +0 -21
  122. data/test/tzinfo-data/tzinfo/data/definitions/Etc/UTC.rb +0 -21
  123. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Amsterdam.rb +0 -273
  124. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Andorra.rb +0 -198
  125. data/test/tzinfo-data/tzinfo/data/definitions/Europe/London.rb +0 -333
  126. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Paris.rb +0 -277
  127. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Prague.rb +0 -235
  128. data/test/tzinfo-data/tzinfo/data/definitions/UTC.rb +0 -16
  129. data/test/tzinfo-data/tzinfo/data/indexes/countries.rb +0 -940
  130. data/test/tzinfo-data/tzinfo/data/indexes/timezones.rb +0 -609
  131. data/test/tzinfo-data/tzinfo/data/version.rb +0 -20
  132. data/test/zoneinfo/America/Argentina/Buenos_Aires +0 -0
  133. data/test/zoneinfo/America/New_York +0 -0
  134. data/test/zoneinfo/Australia/Melbourne +0 -0
  135. data/test/zoneinfo/EST +0 -0
  136. data/test/zoneinfo/Etc/UTC +0 -0
  137. data/test/zoneinfo/Europe/Amsterdam +0 -0
  138. data/test/zoneinfo/Europe/Andorra +0 -0
  139. data/test/zoneinfo/Europe/London +0 -0
  140. data/test/zoneinfo/Europe/Paris +0 -0
  141. data/test/zoneinfo/Europe/Prague +0 -0
  142. data/test/zoneinfo/Factory +0 -0
  143. data/test/zoneinfo/iso3166.tab +0 -274
  144. data/test/zoneinfo/leapseconds +0 -78
  145. data/test/zoneinfo/posix/Europe/London +0 -0
  146. data/test/zoneinfo/posixrules +0 -0
  147. data/test/zoneinfo/right/Europe/London +0 -0
  148. data/test/zoneinfo/zone.tab +0 -452
  149. data/test/zoneinfo/zone1970.tab +0 -384
  150. data/tzinfo.gemspec +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddfbcb761e22870203af94d9cd3d47254ce0487d49ab51d804190d7d1961c125
4
- data.tar.gz: f1e1f7eb70f406974d3fdbcda4cb78a6e2fa0842c0a6ec912fe80986a59e57fa
3
+ metadata.gz: a7f0a351bb373ff9068cb63ac357116b714aba6ee3a80c937bab19598f1cb524
4
+ data.tar.gz: 73fe312723a4ffdeb9ca5340156ef3708795d8485dfd4739aaef5d7c79773937
5
5
  SHA512:
6
- metadata.gz: 5fe024d4d8c134dc324dedab7e6bca66293cf52e80ca16a3d32222e961dd5b563eead2bd110a72a212e7cde0e8ad0c87bc075ce19ad06e3d46ee0b3c3fb45c0a
7
- data.tar.gz: 2c9c48dd44315d61129850ee160932f64afb1e90d8ca82dcd9388b2a79699c3b140340c9541ef822ba02d0791bc4df7c1c7e5a15c9d5840d37f177c1e5942242
6
+ metadata.gz: 5ac0373dd3c0355db72d99d0cb59fb5adb34cd26bc084bdf3beaa06e35e195e23fbeb444b6d125d956157ab66705fe044c0b12111db634873d90ecccddc59aca
7
+ data.tar.gz: 04cddba2b691dc949cd61d9a2f5dd58a77a9bd4d0c5042fa02d43359432edeba36e336db7bf1fa0dc0289eaa17c2f6fb08631af7211ed21f07ebb51a22461471
@@ -1,3 +1 @@
1
- 3�y�=��Q��h�n�;�D7`��Ug�����T���Z�RvP;4P��pQGu�I+���Qubd��p۲�o�W[��x��q.wyyU�ٽ�a�!2kniƔ9�z
2
- 4�ِ�qjJ�i> f쉾�|���u�#��՞�I�O0G4�&|���b�o�
3
- A���f���X}�`o��n;>J�iHx�@?���po��׮�CC
1
+ .Wv(,M����|Yg$8�P������~T�œ���N����7�)�F��@�e���XeqM%�d��pʮ�ܣ��(�Zn?�5��F�V�{q��JQ��ό�v�`�,,b]nVewFU�y�\3�]α�tE(v����1�y��B/?o�C0Cj2k1}����C<�j/�b�e�?��/�\@G�o�&4 9xՀ����8'���JE�����I��x�8>(mV~E~;�<�\�>��?&��~�l
data.tar.gz.sig CHANGED
Binary file
data/.yardopts CHANGED
@@ -1,4 +1,7 @@
1
+ --markup markdown
1
2
  --no-private
3
+ --protected
4
+ --readme README.md
2
5
  lib/**/*.rb
3
6
  -
4
7
  CHANGES.md
data/CHANGES.md CHANGED
@@ -1,91 +1,196 @@
1
- Version 1.2.9 - 16-Dec-2020
2
- ---------------------------
3
-
4
- * Fixed an incorrect InvalidTimezoneIdentifier exception raised when loading a
5
- zoneinfo file that includes rules specifying an additional transition to the
6
- final defined offset (for example, Africa/Casablanca in version 2018e of the
7
- Time Zone Database). #123.
8
-
9
-
10
- Version 1.2.8 - 8-Nov-2020
11
- --------------------------
12
-
13
- * Added support for handling "slim" format zoneinfo files that are produced by
14
- default by zic version 2020b and later. The POSIX-style TZ string is now used
15
- calculate DST transition times after the final defined transition in the file.
16
- The 64-bit section is now always used regardless of whether Time has support
17
- for 64-bit times. #120.
18
- * Rubinius is no longer supported.
19
-
20
-
21
- Version 1.2.7 - 2-Apr-2020
22
- --------------------------
23
-
24
- * Fixed 'wrong number of arguments' errors when running on JRuby 9.0. #114.
25
- * Fixed warnings when running on Ruby 2.8. #112.
26
-
27
-
28
- Version 1.2.6 - 24-Dec-2019
29
- ---------------------------
30
-
31
- * Timezone#strftime('%s', time) will now return the correct number of seconds
32
- since the epoch. #91.
33
- * Removed the unused TZInfo::RubyDataSource::REQUIRE_PATH constant.
34
- * Fixed "SecurityError: Insecure operation - require" exceptions when loading
35
- data with recent Ruby releases in safe mode.
36
- * Fixed warnings when running on Ruby 2.7. #106 and #111.
37
-
38
-
39
- Version 1.2.5 - 4-Feb-2018
40
- --------------------------
41
-
42
- * Support recursively (deep) freezing Country and Timezone instances. #80.
1
+ # Changes
2
+
3
+ ## Version 2.0.0 - 26-Dec-2018
4
+
5
+ ### Added
6
+
7
+ * `to_local` and `period_for` instance methods have been added to
8
+ `TZInfo::Timezone`. These are similar to `utc_to_local` and `period_for_utc`,
9
+ but take the UTC offset of the given time into account.
10
+ * `abbreviation`, `dst?`, `base_utc_offset` and `observed_utc_offset` instance
11
+ methods have been added to `TZInfo::Timezone`, returning the abbreviation,
12
+ whether daylight savings time is in effect and the UTC offset of the time zone
13
+ at a specified time.
14
+ * A `TZInfo::Timestamp` class has been added. It can be used with
15
+ `TZInfo::Timezone` in place of a `Time` or `DateTime`.
16
+ * `local_time`, `local_datetime` and `local_timestamp` instance methods have
17
+ been added to `TZInfo::Timezone`. These methods construct local `Time`,
18
+ `DateTime` and `TZInfo::Timestamp` instances with the correct UTC offset and
19
+ abbreviation for the time zone.
20
+ * Support for a (yet to be released) version 2 of tzinfo-data has been added, in
21
+ addition to support for version 1. The new version will remove the (no longer
22
+ needed) `DateTime` parameters from transition times, reduce memory consumption
23
+ and improve the efficiency of loading timezone and country indexes.
24
+ * A `TZInfo::VERSION` constant has been added, indicating the TZInfo version
25
+ number.
26
+
27
+ ### Changed
28
+
29
+ * The minimum supported Ruby versions are now Ruby MRI 1.9.3, JRuby 1.7 (in 1.9
30
+ or later mode) and Rubinius 3.
31
+ * Local times are now returned using the correct UTC offset (instead of using
32
+ UTC). #49 and #52.
33
+ * Local times are returned as instances of `TimeWithOffset`,
34
+ `DateTimeWithOffset` or `TZInfo::TimestampWithOffset`. These classes subclass
35
+ `Time`, `DateTime` and `TZInfo::Timestamp` respectively. They override the
36
+ default behaviour of the base classes to return information about the observed
37
+ offset at the indicated time. For example, the zone abbreviation is returned
38
+ when using the `%Z` directive with `strftime`.
39
+ * The `transitions_up_to`, `offsets_up_to` and `strftime` instance methods of
40
+ `TZInfo::Timezone` now take the UTC offsets of given times into account
41
+ (instead of ignoring them as was previously the case).
42
+ * The `TZInfo::TimezonePeriod` class has been split into two subclasses:
43
+ `TZInfo::OffsetTimezonePeriod` and `TZInfo::TransitionsTimezonePeriod`.
44
+ `TZInfo::OffsetTimezonePeriod` is returned for time zones that only have a
45
+ single offset. `TZInfo::TransitionsTimezonePeriod` is returned for periods
46
+ that start or end with a transition.
47
+ * `TZInfo::TimezoneOffset#abbreviation`, `TZInfo::TimezonePeriod#abbreviation`
48
+ and `TZInfo::TimezonePeriod#zone_identifier` now return frozen `String`
49
+ instances instead of instances of `Symbol`.
50
+ * The `utc_offset` and `utc_total_offset` attributes of `TZInfo::TimezonePeriod`
51
+ and `TZInfo::TimezoneOffset` have been renamed `base_utc_offset` and
52
+ `observed_utc_offset` respectively. The former names have been retained as
53
+ aliases.
54
+ * `TZInfo::Timezone.get`, `TZInfo::Timezone.get_proxy` and `TZInfo::Country.get`
55
+ can now be used with strings having any encoding. Previously, only encodings
56
+ that are directly comparable with UTF-8 were supported.
57
+ * The requested identifier is included in `TZInfo::InvalidTimezoneIdentifier`
58
+ exception messages.
59
+ * The requested country code is included in `TZInfo::InvalidCountryCode`
60
+ exception messages.
61
+ * The full range of transitions is now loaded from zoneinfo files. Zoneinfo
62
+ files produced with version 2014c of the `zic` tool contain an initial
63
+ transition `2**63` seconds before the epoch. Zoneinfo files produced with
64
+ version 2014d or later of `zic` contain an initial transition `2**59` seconds
65
+ before the epoch. These transitions would previously have been ignored, but
66
+ are now returned in methods such as `TZInfo::Timezone#transitions_up_to`.
67
+ * The `TZInfo::RubyDataSource` and `TZInfo::ZoneinfoDataSource` classes have
68
+ been moved into a new `TZInfo::DataSources` module. Code that is setting
69
+ `TZInfo::ZoneinfoDataSource.search_path` or
70
+ `TZInfo::ZoneinfoDataSource.alternate_iso3166_tab_search_path` will need to be
71
+ updated accordingly.
72
+ * The `TZInfo::InvalidZoneinfoDirectory` and `TZInfo::ZoneinfoDirectoryNotFound`
73
+ exception classes raised by `TZInfo::DataSources::ZoneinfoDataSource` have
74
+ been moved into the `TZInfo::DataSources` module.
75
+ * Setting the data source to `:ruby` or instantiating
76
+ `TZInfo::DataSources::RubyDataSource` will now immediately raise a
77
+ `TZInfo::DataSources::TZInfoDataNotFound` exception if `require 'tzinfo/data'`
78
+ fails. Previously, a failure would only occur later when accessing an index or
79
+ loading a timezone or country.
80
+ * The `DEFAULT_SEARCH_PATH` and `DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH`
81
+ constants of `TZInfo::DataSources::ZoneinfoDataSource` have been made private.
82
+ * The `TZInfo::Country.data_source`,
83
+ `TZInfo::DataSource.create_default_data_source`,
84
+ `TZInfo::DataSources::ZoneinfoDataSource.process_search_path`,
85
+ `TZInfo::Timezone.get_proxies` and `TZInfo::Timezone.data_source` methods have
86
+ been made private.
87
+ * The performance of loading zoneinfo files and the associated indexes has been
88
+ improved.
89
+ * Memory use has been decreased by deduplicating `String` instances when loading
90
+ country and time zone data.
91
+ * The dependency on the deprecated thread_safe gem as been removed and replaced
92
+ by concurrent-ruby.
93
+ * The Info classes used to return time zone and country information from
94
+ `TZInfo::DataSource` implementations have been moved into the
95
+ `TZInfo::DataSources` module.
96
+ * The `TZInfo::TransitionDataTimezoneInfo` class has been removed and replaced
97
+ with `TZInfo::DataSources::TransitionsDataTimezoneInfo` and
98
+ `TZInfo::DataSources::ConstantOffsetDataTimezoneInfo`.
99
+ `TZInfo::DataSources::TransitionsDataTimezoneInfo` is constructed with an
100
+ `Array` of `TZInfo::TimezoneTransition` instances representing times when the
101
+ offset changes. `TZInfo::DataSources::ConstantOffsetDataTimezoneInfo` is
102
+ constructed with a `TZInfo::TimezoneOffset` instance representing the offset
103
+ constantly observed in a time zone.
104
+ * The `TZInfo::DataSource#timezone_identifiers` method should no longer be
105
+ overridden in custom data source implementations. The implementation in the
106
+ base class now calculates a result from
107
+ `TZInfo::DataSource#data_timezone_identifiers` and
108
+ `TZInfo::DataSource#linked_timezone_identifiers`.
109
+ * The results of the `TZInfo::DataSources::RubyDataSource` `to_s` and `inspect`
110
+ methods now include the time zone database and tzinfo-data versions.
111
+
112
+
113
+ ### Removed
114
+
115
+ * Methods of `TZInfo::Timezone` that accept time arguments no longer allow
116
+ `Integer` timestamp values. `Time`, `DateTime` or `TZInfo::Timestamp` values
117
+ or objects that respond to `to_i`, `subsec` and optionally `utc_offset` must
118
+ be used instead.
119
+ * The `%:::z` format directive can now only be used with
120
+ `TZInfo::Timezone#strftime` if it is supported by `Time#strftime` on the
121
+ runtime platform.
122
+ * Using `TZInfo::Timezone.new(identifier)` and `TZInfo::Country.new(code)` to
123
+ obtain a specific `TZInfo::Timezone` or `TZInfo::Country` will no longer work.
124
+ `TZInfo::Timezone.get(identifier)` and `TZInfo::Country.get(code)` should be
125
+ used instead.
126
+ * The `TZInfo::TimeOrDateTime` class has been removed.
127
+ * The `valid_for_utc?`, `utc_after_start?`, `utc_before_end?`,
128
+ `valid_for_local?`, `local_after_start?` and `local_before_end?` instance
129
+ methods of `TZInfo::TimezonePeriod` have been removed. Comparisons can be
130
+ performed with the results of the `starts_at`, `ends_at`, `local_starts_at`
131
+ and `local_ends_at` methods instead.
132
+ * The `to_local` and `to_utc` instance methods of `TZInfo::TimezonePeriod` and
133
+ `TZInfo::TimezoneOffset` have been removed. Conversions should be performed
134
+ using the `TZInfo::Timezone` class instead.
135
+ * The `TZInfo::TimezonePeriod#utc_total_offset_rational` method has been
136
+ removed. Equivalent information can be obtained using the
137
+ `TZInfo::TimezonePeriod#observed_utc_offset` method.
138
+ * The `datetime`, `time`, `local_end`, `local_end_time`, `local_start` and
139
+ `local_start_time` instance methods of `TZInfo::TimezoneTransition` have been
140
+ removed. The `at`, `local_end_at` and `local_start_at` methods should be used
141
+ instead and the result (a `TZInfo::TimestampWithOffset`) converted to either a
142
+ `DateTime` or `Time` by calling `to_datetime` or `to_time` on the result.
143
+ * The `us_zones` and `us_zone_identifiers` class methods of `TZInfo::Timezone`
144
+ have been removed. `TZInfo::Country.get('US').zones` and
145
+ `TZInfo::Country.get('US').zone_identifiers` should be used instead.
146
+
147
+
148
+ ## Version 1.2.5 - 4-Feb-2018
149
+
150
+ * Support recursively (deep) freezing `Country` and `Timezone` instances. #80.
43
151
  * Allow negative daylight savings time offsets to be derived when reading from
44
152
  zoneinfo files. The utc_offset and std_offset are now derived correctly for
45
153
  Europe/Dublin in the 2018a and 2018b releases of the Time Zone Database.
46
154
 
47
155
 
48
- Version 1.2.4 - 26-Oct-2017
49
- ---------------------------
156
+ ## Version 1.2.4 - 26-Oct-2017
50
157
 
51
158
  * Ignore the leapseconds file that is included in zoneinfo directories installed
52
159
  with version 2017c and later of the Time Zone Database.
53
160
 
54
161
 
55
- Version 1.2.3 - 25-Mar-2017
56
- ---------------------------
162
+ ## Version 1.2.3 - 25-Mar-2017
57
163
 
58
- * Reduce the number of String objects allocated when loading zoneinfo files.
164
+ * Reduce the number of `String` objects allocated when loading zoneinfo files.
59
165
  #54.
60
- * Make Timezone#friendly_identifier compatible with frozen string literals.
61
- * Improve the algorithm for deriving the utc_offset from zoneinfo files. This
166
+ * Make `Timezone#friendly_identifier` compatible with frozen string literals.
167
+ * Improve the algorithm for deriving the `utc_offset` from zoneinfo files. This
62
168
  now correctly handles Pacific/Apia switching from one side of the
63
169
  International Date Line to the other whilst observing daylight savings time.
64
170
  #66.
65
- * Fix an UnknownTimezone exception when calling transitions_up_to or
66
- offsets_up_to on a TimezoneProxy instance obtained from Timezone.get_proxy.
171
+ * Fix an `UnknownTimezone` exception when calling transitions_up_to or
172
+ offsets_up_to on a `TimezoneProxy` instance obtained from
173
+ `Timezone.get_proxy`.
67
174
  * Allow the Factory zone to be obtained from the Zoneinfo data source.
68
175
  * Ignore the /usr/share/zoneinfo/timeconfig symlink included in Slackware
69
176
  distributions. #64.
70
- * Fix Timezone#strftime handling of %Z expansion when %Z is prefixed with more
71
- than one percent. #31.
72
- * Support expansion of %z, %:z, %::z and %:::z to the UTC offset of the time
73
- zone in Timezone#strftime. #31 and #67.
177
+ * Fix `Timezone#strftime` handling of `%Z` expansion when `%Z` is prefixed with
178
+ more than one percent. #31.
179
+ * Support expansion of `%z`, `%:z`, `%::z` and `%:::z` to the UTC offset of the
180
+ time zone in `Timezone#strftime`. #31 and #67.
74
181
 
75
182
 
76
- Version 1.2.2 - 8-Aug-2014
77
- --------------------------
183
+ ## Version 1.2.2 - 8-Aug-2014
78
184
 
79
- * Fix an error with duplicates being returned by Timezone#all_country_zones
80
- and Timezone#all_country_zone_identifiers when used with tzinfo-data
185
+ * Fix an error with duplicates being returned by `Timezone#all_country_zones`
186
+ and `Timezone#all_country_zone_identifiers` when used with tzinfo-data
81
187
  v1.2014.6 or later.
82
188
  * Use the zone1970.tab file for country timezone data if it is found in the
83
189
  zoneinfo directory (and fallback to zone.tab if not). zone1970.tab was added
84
190
  in tzdata 2014f. zone.tab is now deprecated.
85
191
 
86
192
 
87
- Version 1.2.1 - 1-Jun-2014
88
- --------------------------
193
+ ## Version 1.2.1 - 1-Jun-2014
89
194
 
90
195
  * Support zoneinfo files generated with zic version 2014c and later.
91
196
  * On platforms that only support positive 32-bit timestamps, ensure that
@@ -94,55 +199,52 @@ Version 1.2.1 - 1-Jun-2014
94
199
  * Minor documentation improvements.
95
200
 
96
201
 
97
- Version 1.2.0 - 26-May-2014
98
- ---------------------------
202
+ ## Version 1.2.0 - 26-May-2014
99
203
 
100
204
  * Raise the minimum supported Ruby version to 1.8.7.
101
205
  * Support loading system zoneinfo data on FreeBSD, OpenBSD and Solaris.
102
206
  Resolves #15.
103
- * Add canonical_identifier and canonical_zone methods to Timezone. Resolves #16.
104
- * Add a link to a DataSourceNotFound help page in the TZInfo::DataSourceNotFound
105
- exception message.
207
+ * Add `canonical_identifier` and `canonical_zone` methods to `Timezone`.
208
+ Resolves #16.
209
+ * Add a link to a `DataSourceNotFound` help page in the
210
+ `TZInfo::DataSourceNotFound` exception message.
106
211
  * Load iso3166.tab and zone.tab files as UTF-8.
107
- * Fix Timezone#local_to_utc returning local Time instances on systems using UTC
108
- as the local time zone. Resolves #13.
109
- * Fix == methods raising an exception when passed an instance of a different
110
- class by making <=> return nil if passed a non-comparable argument.
111
- * Eliminate "require 'rational'" warnings. Resolves #10.
212
+ * Fix `Timezone#local_to_utc` returning local `Time` instances on systems using
213
+ UTC as the local time zone. Resolves #13.
214
+ * Fix `==` methods raising an exception when passed an instance of a different
215
+ class by making `<=>` return `nil` if passed a non-comparable argument.
216
+ * Eliminate `require 'rational'` warnings. Resolves #10.
112
217
  * Eliminate "assigned but unused variable - info" warnings. Resolves #11.
113
218
  * Switch to minitest v5 for unit tests. Resolves #18.
114
219
 
115
220
 
116
- Version 1.1.0 - 25-Sep-2013
117
- ---------------------------
221
+ ## Version 1.1.0 - 25-Sep-2013
118
222
 
119
- * TZInfo is now thread safe. ThreadSafe::Cache is now used instead of Hash
120
- to cache Timezone and Country instances returned by Timezone.get and
121
- Country.get. The tzinfo gem now depends on thread_safe ~> 0.1.
122
- * Added a transitions_up_to method to Timezone that returns a list of the times
123
- where the UTC offset of the timezone changes.
124
- * Added an offsets_up_to method to Timezone that returns the set of offsets
223
+ * TZInfo is now thread safe. `ThreadSafe::Cache` is now used instead of `Hash`
224
+ to cache `Timezone` and `Country` instances returned by `Timezone.get` and
225
+ `Country.get`. The tzinfo gem now depends on thread_safe ~> 0.1.
226
+ * Added a `transitions_up_to` method to `Timezone` that returns a list of the
227
+ times where the UTC offset of the timezone changes.
228
+ * Added an `offsets_up_to` method to `Timezone` that returns the set of offsets
125
229
  that have been observed in a defined timezone.
126
- * Fixed a "can't modify frozen String" error when loading a Timezone from a
127
- zoneinfo file using an identifier String that is both tainted and frozen.
230
+ * Fixed a "can't modify frozen String" error when loading a `Timezone` from a
231
+ zoneinfo file using an identifier `String` that is both tainted and frozen.
128
232
  Resolves #3.
129
233
  * Support TZif3 format zoneinfo files (now produced by zic from tzcode version
130
234
  2013e onwards).
131
235
  * Support using YARD to generate documentation (added a .yardopts file).
132
236
  * Ignore the +VERSION file included in the zoneinfo directory on Mac OS X.
133
- * Added a note to the documentation concerning 32-bit zoneinfo files (as
237
+ * Added a note to the documentation concerning 32-bit zoneinfo files (as
134
238
  included with Mac OS X).
135
239
 
136
240
 
137
- Version 1.0.1 - 22-Jun-2013
138
- ---------------------------
241
+ ## Version 1.0.1 - 22-Jun-2013
139
242
 
140
243
  * Fix a test case failure when tests are run from a directory that contains a
141
244
  dot in the path (issue #29751).
142
245
 
143
246
 
144
- Version 1.0.0 - 2-Jun-2013
145
- --------------------------
247
+ ## Version 1.0.0 - 2-Jun-2013
146
248
 
147
249
  * Allow TZInfo to be used with different data sources instead of just the
148
250
  built-in Ruby module data files.
@@ -151,73 +253,71 @@ Version 1.0.0 - 2-Jun-2013
151
253
  distributions.
152
254
  * Remove the definition and index Ruby modules from TZInfo and move them into
153
255
  a separate TZInfo::Data library (available as the tzinfo-data gem).
154
- * Default to using the TZInfo::Data library as the data source if it is
256
+ * Default to using the TZInfo::Data library as the data source if it is
155
257
  installed, otherwise use zoneinfo files instead.
156
- * Preserve the nanoseconds of local timezone Time objects when performing
258
+ * Preserve the nanoseconds of local timezone Time objects when performing
157
259
  conversions (issue #29705).
158
260
  * Don't add the tzinfo lib directory to the search path when requiring 'tzinfo'.
159
261
  The tzinfo lib directory must now be in the search path before 'tzinfo' is
160
262
  required.
161
- * Add utc_start_time, utc_end_time, local_start_time and local_end_time instance
162
- methods to TimezonePeriod. These return an identical value as the existing
163
- utc_start, utc_end, local_start and local_end methods, but return Time
164
- instances instead of DateTime.
165
- * Make the start_transition, end_transition and offset properties of
166
- TimezonePeriod protected. To access properties of the period, callers should
167
- use other TimezonePeriod instance methods instead (issue #7655).
263
+ * Add `utc_start_time`, `utc_end_time`, `local_start_time` and `local_end_time`
264
+ instance methods to `TimezonePeriod`. These return an identical value as the
265
+ existing `utc_start`, `utc_end`, `local_start` and `local_end` methods, but
266
+ return `Time` instances instead of `DateTime`.
267
+ * Make the `start_transition`, `end_transition` and `offset` properties of
268
+ `TimezonePeriod` protected. To access properties of the period, callers should
269
+ use other `TimezonePeriod` instance methods instead (issue #7655).
168
270
 
169
271
 
170
- Version 0.3.53 (tzdata v2017b) - 23-Mar-2017
171
- --------------------------------------------
272
+ ## Version 0.3.54 (tzdata v2018d) - 25-Mar-2018
273
+
274
+ * Updated to tzdata version 2018d
275
+ (<https://mm.icann.org/pipermail/tz-announce/2018-March/000049.html>).
276
+
277
+
278
+ ## Version 0.3.53 (tzdata v2017b) - 23-Mar-2017
172
279
 
173
280
  * Updated to tzdata version 2017b
174
- (https://mm.icann.org/pipermail/tz-announce/2017-March/000046.html).
281
+ (<https://mm.icann.org/pipermail/tz-announce/2017-March/000046.html>).
175
282
 
176
283
 
177
- Version 0.3.52 (tzdata v2016h) - 28-Oct-2016
178
- --------------------------------------------
284
+ ## Version 0.3.52 (tzdata v2016h) - 28-Oct-2016
179
285
 
180
286
  * Updated to tzdata version 2016h
181
- (https://mm.icann.org/pipermail/tz-announce/2016-October/000042.html).
287
+ (<https://mm.icann.org/pipermail/tz-announce/2016-October/000042.html>).
182
288
 
183
289
 
184
- Version 0.3.51 (tzdata v2016f) - 5-Jul-2016
185
- -------------------------------------------
290
+ ## Version 0.3.51 (tzdata v2016f) - 5-Jul-2016
186
291
 
187
292
  * Updated to tzdata version 2016f
188
- (https://mm.icann.org/pipermail/tz-announce/2016-July/000040.html).
293
+ (<https://mm.icann.org/pipermail/tz-announce/2016-July/000040.html>).
189
294
 
190
295
 
191
- Version 0.3.50 (tzdata v2016e) - 14-Jun-2016
192
- --------------------------------------------
296
+ ## Version 0.3.50 (tzdata v2016e) - 14-Jun-2016
193
297
 
194
298
  * Updated to tzdata version 2016e
195
- (https://mm.icann.org/pipermail/tz-announce/2016-June/000039.html).
299
+ (<https://mm.icann.org/pipermail/tz-announce/2016-June/000039.html>).
196
300
 
197
301
 
198
- Version 0.3.49 (tzdata v2016d) - 18-Apr-2016
199
- --------------------------------------------
302
+ ## Version 0.3.49 (tzdata v2016d) - 18-Apr-2016
200
303
 
201
304
  * Updated to tzdata version 2016d
202
- (https://mm.icann.org/pipermail/tz-announce/2016-April/000038.html).
305
+ (<https://mm.icann.org/pipermail/tz-announce/2016-April/000038.html>).
203
306
 
204
307
 
205
- Version 0.3.48 (tzdata v2016c) - 23-Mar-2016
206
- --------------------------------------------
308
+ ## Version 0.3.48 (tzdata v2016c) - 23-Mar-2016
207
309
 
208
310
  * Updated to tzdata version 2016c
209
- (https://mm.icann.org/pipermail/tz-announce/2016-March/000037.html).
311
+ (<https://mm.icann.org/pipermail/tz-announce/2016-March/000037.html>).
210
312
 
211
313
 
212
- Version 0.3.47 (tzdata v2016b) - 15-Mar-2016
213
- --------------------------------------------
314
+ ## Version 0.3.47 (tzdata v2016b) - 15-Mar-2016
214
315
 
215
316
  * Updated to tzdata version 2016b
216
- (https://mm.icann.org/pipermail/tz-announce/2016-March/000036.html).
317
+ (<https://mm.icann.org/pipermail/tz-announce/2016-March/000036.html>).
217
318
 
218
319
 
219
- Version 0.3.46 (tzdata v2015g) - 2-Dec-2015
220
- -------------------------------------------
320
+ ## Version 0.3.46 (tzdata v2015g) - 2-Dec-2015
221
321
 
222
322
  * From version 2015e, the IANA time zone database uses non-ASCII characters in
223
323
  country names. Backport the encoding handling from TZInfo::Data to allow
@@ -225,425 +325,382 @@ Version 0.3.46 (tzdata v2015g) - 2-Dec-2015
225
325
  byte sequence error when loading the countries index). Resolves #41.
226
326
 
227
327
 
228
- Version 0.3.45 (tzdata v2015g) - 3-Oct-2015
229
- -------------------------------------------
328
+ ## Version 0.3.45 (tzdata v2015g) - 3-Oct-2015
230
329
 
231
330
  * Updated to tzdata version 2015g
232
- (https://mm.icann.org/pipermail/tz-announce/2015-October/000034.html).
331
+ (<https://mm.icann.org/pipermail/tz-announce/2015-October/000034.html>).
233
332
 
234
333
 
235
- Version 0.3.44 (tzdata v2015d) - 24-Apr-2015
236
- --------------------------------------------
334
+ ## Version 0.3.44 (tzdata v2015d) - 24-Apr-2015
237
335
 
238
336
  * Updated to tzdata version 2015d
239
- (https://mm.icann.org/pipermail/tz-announce/2015-April/000031.html).
337
+ (<https://mm.icann.org/pipermail/tz-announce/2015-April/000031.html>).
240
338
 
241
339
 
242
- Version 0.3.43 (tzdata v2015a) - 31-Jan-2015
243
- --------------------------------------------
340
+ ## Version 0.3.43 (tzdata v2015a) - 31-Jan-2015
244
341
 
245
342
  * Updated to tzdata version 2015a
246
- (https://mm.icann.org/pipermail/tz-announce/2015-January/000028.html).
343
+ (<https://mm.icann.org/pipermail/tz-announce/2015-January/000028.html>).
247
344
 
248
345
 
249
- Version 0.3.42 (tzdata v2014i) - 23-Oct-2014
250
- --------------------------------------------
346
+ ## Version 0.3.42 (tzdata v2014i) - 23-Oct-2014
251
347
 
252
348
  * Updated to tzdata version 2014i
253
- (https://mm.icann.org/pipermail/tz-announce/2014-October/000026.html).
349
+ (<https://mm.icann.org/pipermail/tz-announce/2014-October/000026.html>).
254
350
 
255
351
 
256
- Version 0.3.41 (tzdata v2014f) - 8-Aug-2014
257
- -------------------------------------------
352
+ ## Version 0.3.41 (tzdata v2014f) - 8-Aug-2014
258
353
 
259
354
  * Updated to tzdata version 2014f
260
- (https://mm.icann.org/pipermail/tz-announce/2014-August/000023.html).
355
+ (<https://mm.icann.org/pipermail/tz-announce/2014-August/000023.html>).
261
356
 
262
357
 
263
- Version 0.3.40 (tzdata v2014e) - 10-Jul-2014
264
- --------------------------------------------
358
+ ## Version 0.3.40 (tzdata v2014e) - 10-Jul-2014
265
359
 
266
360
  * Updated to tzdata version 2014e
267
- (https://mm.icann.org/pipermail/tz-announce/2014-June/000022.html).
361
+ (<https://mm.icann.org/pipermail/tz-announce/2014-June/000022.html>).
268
362
 
269
363
 
270
- Version 0.3.39 (tzdata v2014a) - 9-Mar-2014
271
- -------------------------------------------
364
+ ## Version 0.3.39 (tzdata v2014a) - 9-Mar-2014
272
365
 
273
366
  * Updated to tzdata version 2014a
274
- (https://mm.icann.org/pipermail/tz-announce/2014-March/000018.html).
367
+ (<https://mm.icann.org/pipermail/tz-announce/2014-March/000018.html>).
275
368
 
276
369
 
277
- Version 0.3.38 (tzdata v2013g) - 8-Oct-2013
278
- -------------------------------------------
370
+ ## Version 0.3.38 (tzdata v2013g) - 8-Oct-2013
279
371
 
280
372
  * Updated to tzdata version 2013g
281
- (https://mm.icann.org/pipermail/tz-announce/2013-October/000015.html).
373
+ (<https://mm.icann.org/pipermail/tz-announce/2013-October/000015.html>).
282
374
 
283
375
 
284
- Version 0.3.37 (tzdata v2013b) - 11-Mar-2013
285
- --------------------------------------------
376
+ ## Version 0.3.37 (tzdata v2013b) - 11-Mar-2013
286
377
 
287
378
  * Updated to tzdata version 2013b
288
- (https://mm.icann.org/pipermail/tz-announce/2013-March/000010.html).
379
+ (<https://mm.icann.org/pipermail/tz-announce/2013-March/000010.html>).
289
380
 
290
381
 
291
- Version 0.3.36 (tzdata v2013a) - 3-Mar-2013
292
- -------------------------------------------
382
+ ## Version 0.3.36 (tzdata v2013a) - 3-Mar-2013
293
383
 
294
384
  * Updated to tzdata version 2013a
295
- (https://mm.icann.org/pipermail/tz-announce/2013-March/000009.html).
296
- * Fix TimezoneTransitionInfo#eql? incorrectly returning false when running on
385
+ (<https://mm.icann.org/pipermail/tz-announce/2013-March/000009.html>).
386
+ * Fix `TimezoneTransitionInfo#eql?` incorrectly returning false when running on
297
387
  Ruby 2.0.
298
- * Change eql? and == implementations to test the class of the passed in object
299
- instead of checking individual properties with 'respond_to?'.
388
+ * Change `eql?` and `==` implementations to test the class of the passed in
389
+ object instead of checking individual properties with `respond_to?`.
300
390
 
301
391
 
302
- Version 0.3.35 (tzdata v2012i) - 4-Nov-2012
303
- -------------------------------------------
392
+ ## Version 0.3.35 (tzdata v2012i) - 4-Nov-2012
304
393
 
305
394
  * Updated to tzdata version 2012i
306
- (https://mm.icann.org/pipermail/tz-announce/2012-November/000007.html).
395
+ (<https://mm.icann.org/pipermail/tz-announce/2012-November/000007.html>).
307
396
 
308
397
 
309
- Version 0.3.34 (tzdata v2012h) - 27-Oct-2012
310
- --------------------------------------------
398
+ ## Version 0.3.34 (tzdata v2012h) - 27-Oct-2012
311
399
 
312
400
  * Updated to tzdata version 2012h
313
- (https://mm.icann.org/pipermail/tz-announce/2012-October/000006.html).
401
+ (<https://mm.icann.org/pipermail/tz-announce/2012-October/000006.html>).
314
402
 
315
403
 
316
- Version 0.3.33 (tzdata v2012c) - 8-Apr-2012
317
- -------------------------------------------
404
+ ## Version 0.3.33 (tzdata v2012c) - 8-Apr-2012
318
405
 
319
406
  * Updated to tzdata version 2012c
320
- (https://mm.icann.org/pipermail/tz/2012-April/017627.html).
407
+ (<https://mm.icann.org/pipermail/tz/2012-April/017627.html>).
321
408
 
322
409
 
323
- Version 0.3.32 (tzdata v2012b) - 4-Mar-2012
324
- -------------------------------------------
410
+ ## Version 0.3.32 (tzdata v2012b) - 4-Mar-2012
325
411
 
326
412
  * Updated to tzdata version 2012b
327
- (https://mm.icann.org/pipermail/tz/2012-March/017524.html).
413
+ (<https://mm.icann.org/pipermail/tz/2012-March/017524.html>).
328
414
 
329
415
 
330
- Version 0.3.31 (tzdata v2011n) - 6-Nov-2011
331
- -------------------------------------------
416
+ ## Version 0.3.31 (tzdata v2011n) - 6-Nov-2011
332
417
 
333
418
  * Updated to tzdata version 2011n
334
- (https://mm.icann.org/pipermail/tz/2011-October/017201.html).
419
+ (<https://mm.icann.org/pipermail/tz/2011-October/017201.html>).
335
420
 
336
421
 
337
- Version 0.3.30 (tzdata v2011k) - 29-Sep-2011
338
- --------------------------------------------
422
+ ## Version 0.3.30 (tzdata v2011k) - 29-Sep-2011
339
423
 
340
424
  * Updated to tzdata version 2011k
341
- (https://mm.icann.org/pipermail/tz/2011-September/008889.html).
425
+ (<https://mm.icann.org/pipermail/tz/2011-September/008889.html>).
342
426
 
343
427
 
344
- Version 0.3.29 (tzdata v2011h) - 27-Jun-2011
345
- --------------------------------------------
428
+ ## Version 0.3.29 (tzdata v2011h) - 27-Jun-2011
346
429
 
347
430
  * Updated to tzdata version 2011h
348
- (https://mm.icann.org/pipermail/tz/2011-June/008576.html).
349
- * Allow the default value of the local_to_utc and period_for_local dst
350
- parameter to be specified globally with a Timezone.default_dst attribute.
431
+ (<https://mm.icann.org/pipermail/tz/2011-June/008576.html>).
432
+ * Allow the default value of the `local_to_utc` and `period_for_local` `dst`
433
+ parameter to be specified globally with a `Timezone.default_dst` attribute.
351
434
  Thanks to Kurt Werle for the suggestion and patch.
352
435
 
353
436
 
354
- Version 0.3.28 (tzdata v2011g) - 13-Jun-2011
355
- ---------------------------------------------
437
+ ## Version 0.3.28 (tzdata v2011g) - 13-Jun-2011
356
438
 
357
- * Add support for Ruby 1.9.3 (trunk revision 31668 and later). Thanks to
439
+ * Add support for Ruby 1.9.3 (trunk revision 31668 and later). Thanks to
358
440
  Aaron Patterson for reporting the problems running on the new version.
359
441
  Closes #29233.
360
442
 
361
443
 
362
- Version 0.3.27 (tzdata v2011g) - 26-Apr-2011
363
- --------------------------------------------
444
+ ## Version 0.3.27 (tzdata v2011g) - 26-Apr-2011
364
445
 
365
446
  * Updated to tzdata version 2011g
366
- (https://mm.icann.org/pipermail/tz/2011-April/016875.html).
447
+ (<https://mm.icann.org/pipermail/tz/2011-April/016875.html>).
367
448
 
368
449
 
369
- Version 0.3.26 (tzdata v2011e) - 2-Apr-2011
370
- -------------------------------------------
450
+ ## Version 0.3.26 (tzdata v2011e) - 2-Apr-2011
371
451
 
372
452
  * Updated to tzdata version 2011e
373
- (https://mm.icann.org/pipermail/tz/2011-April/016809.html).
453
+ (<https://mm.icann.org/pipermail/tz/2011-April/016809.html>).
374
454
 
375
455
 
376
- Version 0.3.25 (tzdata v2011d) - 14-Mar-2011
377
- --------------------------------------------
456
+ ## Version 0.3.25 (tzdata v2011d) - 14-Mar-2011
378
457
 
379
458
  * Updated to tzdata version 2011d
380
- (https://mm.icann.org/pipermail/tz/2011-March/016746.html).
459
+ (<https://mm.icann.org/pipermail/tz/2011-March/016746.html>).
381
460
 
382
461
 
383
- Version 0.3.24 (tzdata v2010o) - 15-Jan-2011
384
- --------------------------------------------
462
+ ## Version 0.3.24 (tzdata v2010o) - 15-Jan-2011
385
463
 
386
464
  * Updated to tzdata version 2010o
387
- (https://mm.icann.org/pipermail/tz/2010-November/016517.html).
465
+ (<https://mm.icann.org/pipermail/tz/2010-November/016517.html>).
388
466
 
389
467
 
390
- Version 0.3.23 (tzdata v2010l) - 19-Aug-2010
391
- --------------------------------------------
468
+ ## Version 0.3.23 (tzdata v2010l) - 19-Aug-2010
392
469
 
393
470
  * Updated to tzdata version 2010l
394
- (https://mm.icann.org/pipermail/tz/2010-August/016360.html).
471
+ (<https://mm.icann.org/pipermail/tz/2010-August/016360.html>).
395
472
 
396
473
 
397
- Version 0.3.22 (tzdata v2010j) - 29-May-2010
398
- --------------------------------------------
474
+ ## Version 0.3.22 (tzdata v2010j) - 29-May-2010
399
475
 
400
476
  * Corrected file permissions issue with 0.3.21 release.
401
477
 
402
478
 
403
- Version 0.3.21 (tzdata v2010j) - 28-May-2010
404
- --------------------------------------------
479
+ ## Version 0.3.21 (tzdata v2010j) - 28-May-2010
405
480
 
406
481
  * Updated to tzdata version 2010j
407
- (https://mm.icann.org/pipermail/tz/2010-May/016211.html).
482
+ (<https://mm.icann.org/pipermail/tz/2010-May/016211.html>).
408
483
  * Change invalid timezone check to exclude characters not used in timezone
409
484
  identifiers and avoid 'character class has duplicated range' warnings with
410
485
  Ruby 1.9.2.
411
- * Ruby 1.9.2 has deprecated "require 'rational'", but older versions of
486
+ * Ruby 1.9.2 has deprecated `require 'rational'`, but older versions of
412
487
  Ruby need rational to be required. Require rational only when the Rational
413
488
  module has not already been loaded.
414
489
  * Remove circular requires (now a warning in Ruby 1.9.2). Instead of using
415
- requires in each file for dependencies, tzinfo.rb now requires all tzinfo
490
+ requires in each file for dependencies, `tzinfo.rb` now requires all tzinfo
416
491
  files. If you were previously requiring files within the tzinfo directory
417
- (e.g. require 'tzinfo/timezone'), then you will now have to
418
- require 'tzinfo' instead.
492
+ (e.g. `require 'tzinfo/timezone'`), then you will now have to
493
+ `require 'tzinfo'` instead.
419
494
 
420
495
 
421
- Version 0.3.20 (tzdata v2010i) - 19-Apr-2010
422
- --------------------------------------------
496
+ ## Version 0.3.20 (tzdata v2010i) - 19-Apr-2010
423
497
 
424
498
  * Updated to tzdata version 2010i
425
- (https://mm.icann.org/pipermail/tz/2010-April/016184.html).
499
+ (<https://mm.icann.org/pipermail/tz/2010-April/016184.html>).
426
500
 
427
501
 
428
- Version 0.3.19 (tzdata v2010h) - 5-Apr-2010
429
- -------------------------------------------
502
+ ## Version 0.3.19 (tzdata v2010h) - 5-Apr-2010
430
503
 
431
504
  * Updated to tzdata version 2010h
432
- (https://mm.icann.org/pipermail/tz/2010-April/016161.html).
505
+ (<https://mm.icann.org/pipermail/tz/2010-April/016161.html>).
433
506
 
434
507
 
435
- Version 0.3.18 (tzdata v2010g) - 29-Mar-2010
436
- --------------------------------------------
508
+ ## Version 0.3.18 (tzdata v2010g) - 29-Mar-2010
437
509
 
438
510
  * Updated to tzdata version 2010g
439
- (https://mm.icann.org/pipermail/tz/2010-March/016140.html).
511
+ (<https://mm.icann.org/pipermail/tz/2010-March/016140.html>).
440
512
 
441
513
 
442
- Version 0.3.17 (tzdata v2010e) - 8-Mar-2010
443
- -------------------------------------------
514
+ ## Version 0.3.17 (tzdata v2010e) - 8-Mar-2010
444
515
 
445
516
  * Updated to tzdata version 2010e
446
- (https://mm.icann.org/pipermail/tz/2010-March/016088.html).
517
+ (<https://mm.icann.org/pipermail/tz/2010-March/016088.html>).
447
518
 
448
519
 
449
- Version 0.3.16 (tzdata v2009u) - 5-Jan-2010
450
- -------------------------------------------
520
+ ## Version 0.3.16 (tzdata v2009u) - 5-Jan-2010
451
521
 
452
522
  * Support the use of '-' to denote '0' as an offset in the tz data files.
453
523
  Used for the first time in the SAVE field in tzdata v2009u.
454
524
  * Updated to tzdata version 2009u
455
- (https://mm.icann.org/pipermail/tz/2009-December/016001.html).
525
+ (<https://mm.icann.org/pipermail/tz/2009-December/016001.html>).
456
526
 
457
527
 
458
- Version 0.3.15 (tzdata v2009p) - 26-Oct-2009
459
- --------------------------------------------
528
+ ## Version 0.3.15 (tzdata v2009p) - 26-Oct-2009
460
529
 
461
530
  * Updated to tzdata version 2009p
462
- (https://mm.icann.org/pipermail/tz/2009-October/015889.html).
531
+ (<https://mm.icann.org/pipermail/tz/2009-October/015889.html>).
463
532
  * Added a description to the gem spec.
464
533
  * List test files in test_files instead of files in the gem spec.
465
534
 
466
535
 
467
- Version 0.3.14 (tzdata v2009l) - 19-Aug-2009
468
- --------------------------------------------
536
+ ## Version 0.3.14 (tzdata v2009l) - 19-Aug-2009
469
537
 
470
538
  * Updated to tzdata version 2009l
471
- (https://mm.icann.org/pipermail/tz/2009-August/015729.html).
539
+ (<https://mm.icann.org/pipermail/tz/2009-August/015729.html>).
472
540
  * Include current directory in load path to allow running tests on
473
541
  Ruby 1.9.2, which doesn't include it by default any more.
474
542
 
475
543
 
476
- Version 0.3.13 (tzdata v2009f) - 15-Apr-2009
477
- --------------------------------------------
544
+ ## Version 0.3.13 (tzdata v2009f) - 15-Apr-2009
478
545
 
479
546
  * Updated to tzdata version 2009f
480
- (https://mm.icann.org/pipermail/tz/2009-April/015544.html).
547
+ (<https://mm.icann.org/pipermail/tz/2009-April/015544.html>).
481
548
  * Untaint the timezone module filename after validation to allow use
482
- with $SAFE == 1 (e.g. under mod_ruby). Thanks to Dmitry Borodaenko for
549
+ with `$SAFE == 1` (e.g. under mod_ruby). Thanks to Dmitry Borodaenko for
483
550
  the suggestion. Closes #25349.
484
551
 
485
552
 
486
- Version 0.3.12 (tzdata v2008i) - 12-Nov-2008
487
- --------------------------------------------
553
+ ## Version 0.3.12 (tzdata v2008i) - 12-Nov-2008
488
554
 
489
555
  * Updated to tzdata version 2008i
490
- (https://mm.icann.org/pipermail/tz/2008-October/015260.html).
556
+ (<https://mm.icann.org/pipermail/tz/2008-October/015260.html>).
491
557
 
492
558
 
493
- Version 0.3.11 (tzdata v2008g) - 7-Oct-2008
494
- -------------------------------------------
559
+ ## Version 0.3.11 (tzdata v2008g) - 7-Oct-2008
495
560
 
496
561
  * Updated to tzdata version 2008g
497
- (https://mm.icann.org/pipermail/tz/2008-October/015139.html).
498
- * Support Ruby 1.9.0-5. Rational.new! has now been removed in Ruby 1.9.
499
- Only use Rational.new! if it is available (it is preferable in Ruby 1.8
562
+ (<https://mm.icann.org/pipermail/tz/2008-October/015139.html>).
563
+ * Support Ruby 1.9.0-5. `Rational.new!` has now been removed in Ruby 1.9.
564
+ Only use `Rational.new!` if it is available (it is preferable in Ruby 1.8
500
565
  for performance reasons). Thanks to Jeremy Kemper and Pratik Naik for
501
566
  reporting this. Closes #22312.
502
567
  * Apply a patch from Pratik Naik to replace assert calls that have been
503
568
  deprecated in the Ruby svn trunk. Closes #22308.
504
569
 
505
570
 
506
- Version 0.3.10 (tzdata v2008f) - 16-Sep-2008
507
- --------------------------------------------
571
+ ## Version 0.3.10 (tzdata v2008f) - 16-Sep-2008
508
572
 
509
573
  * Updated to tzdata version 2008f
510
- (https://mm.icann.org/pipermail/tz/2008-September/015090.html).
574
+ (<https://mm.icann.org/pipermail/tz/2008-September/015090.html>).
511
575
 
512
576
 
513
- Version 0.3.9 (tzdata v2008c) - 27-May-2008
514
- -------------------------------------------
577
+ ## Version 0.3.9 (tzdata v2008c) - 27-May-2008
515
578
 
516
579
  * Updated to tzdata version 2008c
517
- (https://mm.icann.org/pipermail/tz/2008-May/014956.html).
580
+ (<https://mm.icann.org/pipermail/tz/2008-May/014956.html>).
518
581
  * Support loading timezone data in the latest trunk versions of Ruby 1.9.
519
- Rational.new! is now private, so call it using Rational.send :new! instead.
520
- Thanks to Jeremy Kemper and Pratik Naik for spotting this. Closes #19184.
582
+ `Rational.new!` is now private, so call it using `Rational.send :new!`
583
+ instead. Thanks to Jeremy Kemper and Pratik Naik for spotting this. Closes
584
+ #19184.
521
585
  * Prevent warnings from being output when running Ruby with the -v or -w
522
586
  command line options. Thanks to Paul McMahon for the patch. Closes #19719.
523
587
 
524
588
 
525
- Version 0.3.8 (tzdata v2008b) - 24-Mar-2008
526
- -------------------------------------------
589
+ ## Version 0.3.8 (tzdata v2008b) - 24-Mar-2008
527
590
 
528
591
  * Updated to tzdata version 2008b
529
- (https://mm.icann.org/pipermail/tz/2008-March/014910.html).
530
- * Support loading timezone data in Ruby 1.9.0. Use DateTime.new! if it is
531
- available instead of DateTime.new0 when constructing transition times.
532
- DateTime.new! was added in Ruby 1.8.6. DateTime.new0 was removed in
592
+ (<https://mm.icann.org/pipermail/tz/2008-March/014910.html>).
593
+ * Support loading timezone data in Ruby 1.9.0. Use `DateTime.new!` if it is
594
+ available instead of `DateTime.new0` when constructing transition times.
595
+ `DateTime.new!` was added in Ruby 1.8.6. `DateTime.new0` was removed in
533
596
  Ruby 1.9.0. Thanks to Joshua Peek for reporting this. Closes #17606.
534
597
  * Modify some of the equality test cases to cope with the differences
535
598
  between Ruby 1.8.6 and Ruby 1.9.0.
536
599
 
537
600
 
538
- Version 0.3.7 (tzdata v2008a) - 10-Mar-2008
539
- -------------------------------------------
601
+ ## Version 0.3.7 (tzdata v2008a) - 10-Mar-2008
540
602
 
541
603
  * Updated to tzdata version 2008a
542
- (https://mm.icann.org/pipermail/tz/2008-March/014851.html).
604
+ (<https://mm.icann.org/pipermail/tz/2008-March/014851.html>).
543
605
 
544
606
 
545
- Version 0.3.6 (tzdata v2007k) - 1-Jan-2008
546
- ------------------------------------------
607
+ ## Version 0.3.6 (tzdata v2007k) - 1-Jan-2008
547
608
 
548
609
  * Updated to tzdata version 2007k
549
- (https://mm.icann.org/pipermail/tz/2007-December/014765.html).
610
+ (<https://mm.icann.org/pipermail/tz/2007-December/014765.html>).
550
611
  * Removed deprecated RubyGems autorequire option.
551
612
 
552
613
 
553
- Version 0.3.5 (tzdata v2007h) - 1-Oct-2007
554
- ------------------------------------------
614
+ ## Version 0.3.5 (tzdata v2007h) - 1-Oct-2007
555
615
 
556
616
  * Updated to tzdata version 2007h
557
- (https://mm.icann.org/pipermail/tz/2007-October/014585.html).
617
+ (<https://mm.icann.org/pipermail/tz/2007-October/014585.html>).
558
618
 
559
619
 
560
- Version 0.3.4 (tzdata v2007g) - 21-Aug-2007
561
- -------------------------------------------
620
+ ## Version 0.3.4 (tzdata v2007g) - 21-Aug-2007
562
621
 
563
622
  * Updated to tzdata version 2007g
564
- (https://mm.icann.org/pipermail/tz/2007-August/014499.html).
623
+ (<https://mm.icann.org/pipermail/tz/2007-August/014499.html>).
565
624
 
566
625
 
567
- Version 0.3.3 (tzdata v2006p) - 27-Nov-2006
568
- -------------------------------------------
626
+ ## Version 0.3.3 (tzdata v2006p) - 27-Nov-2006
569
627
 
570
628
  * Updated to tzdata version 2006p
571
- (https://mm.icann.org/pipermail/tz/2006-November/013999.html).
629
+ (<https://mm.icann.org/pipermail/tz/2006-November/013999.html>).
572
630
 
573
631
 
574
- Version 0.3.2 (tzdata v2006n) - 11-Oct-2006
575
- -------------------------------------------
632
+ ## Version 0.3.2 (tzdata v2006n) - 11-Oct-2006
576
633
 
577
634
  * Updated to tzdata version 2006n
578
- (https://mm.icann.org/pipermail/tz/2006-October/013911.html). Note that this release of
579
- tzdata removes the country Serbia and Montenegro (CS) and replaces it with
580
- separate Serbia (RS) and Montenegro (ME) entries.
635
+ (<https://mm.icann.org/pipermail/tz/2006-October/013911.html>). Note that this
636
+ release of tzdata removes the country Serbia and Montenegro (CS) and replaces
637
+ it with separate Serbia (RS) and Montenegro (ME) entries.
581
638
 
582
639
 
583
- Version 0.3.1 (tzdata v2006j) - 21-Aug-2006
584
- -------------------------------------------
640
+ ## Version 0.3.1 (tzdata v2006j) - 21-Aug-2006
585
641
 
586
642
  * Remove colon from case statements to avoid warning in Ruby 1.8.5. #5198.
587
643
  * Use temporary variable to avoid dynamic string warning from rdoc.
588
644
  * Updated to tzdata version 2006j
589
- (https://mm.icann.org/pipermail/tz/2006-August/013767.html).
645
+ (<https://mm.icann.org/pipermail/tz/2006-August/013767.html>).
590
646
 
591
647
 
592
- Version 0.3.0 (tzdata v2006g) - 17-Jul-2006
593
- -------------------------------------------
648
+ ## Version 0.3.0 (tzdata v2006g) - 17-Jul-2006
594
649
 
595
650
  * New timezone data format. Timezone data now occupies less space on disk and
596
651
  takes less memory once loaded. #4142, #4144.
597
- * Timezone data is defined in modules rather than classes. Timezone instances
598
- returned by Timezone.get are no longer instances of data classes, but are
599
- instead instances of new DataTimezone and LinkedTimezone classes.
600
- * Timezone instances can now be used with Marshal.dump and Marshal.load. #4240.
601
- * Added a Timezone.get_proxy method that returns a TimezoneProxy object for a
602
- given identifier.
652
+ * Timezone data is defined in modules rather than classes. `Timezone` instances
653
+ returned by `Timezone.get` are no longer instances of data classes, but are
654
+ instead instances of new `DataTimezone` and `LinkedTimezone` classes.
655
+ * `Timezone` instances can now be used with `Marshal.dump` and `Marshal.load`.
656
+ #4240.
657
+ * Added a `Timezone.get_proxy` method that returns a `TimezoneProxy` object for
658
+ a given identifier.
603
659
  * Country index data is now defined in a single module that is independent
604
- of the Country class implementation.
605
- * Country instances can now be used with Marshal.dump and Marshal.load. #4240.
606
- * Country has a new zone_info method that returns CountryTimezone objects
607
- containing additional information (latitude, longitude and a description)
608
- relating to each Timezone. #4140.
609
- * Timezones within a Country are now returned in an order that makes
660
+ of the `Country` class implementation.
661
+ * `Country` instances can now be used with `Marshal.dump` and `Marshal.load`.
662
+ #4240.
663
+ * `Country` has a new `zone_info` method that returns `CountryTimezone` objects
664
+ containing additional information (latitude, longitude and a description)
665
+ relating to each `Timezone`. #4140.
666
+ * Time zones within a `Country` are now returned in an order that makes
610
667
  geographic sense.
611
668
  * The zdumptest utility now checks local to utc conversions in addition to
612
669
  utc to local conversions.
613
- * eql? method defined on Country and Timezone that is equivalent to ==.
614
- * The == method of Timezone no longer raises an exception when passed an object
615
- with no identifier method.
616
- * The == method of Country no longer raises an exception when passed an object
617
- with no code method.
618
- * hash method defined on Country that returns the hash of the code.
619
- * hash method defined on Timezone that returns the hash of the identifier.
670
+ * `eql?` method defined on `Country` and `Timezone` that is equivalent to `==`.
671
+ * The `==` method of `Timezone` no longer raises an exception when passed an
672
+ object with no identifier method.
673
+ * The `==` method of `Country` no longer raises an exception when passed an
674
+ object with no code method.
675
+ * `hash` method defined on `Country` that returns the hash of the code.
676
+ * `hash` method defined on `Timezone` that returns the hash of the identifier.
620
677
  * Miscellaneous API documentation corrections and improvements.
621
678
  * Timezone definition and indexes are now excluded from rdoc (the contents were
622
- previously ignored with #:nodoc: anyway).
623
- * Removed no longer needed #:nodoc: directives from timezone data files (which
679
+ previously ignored with `#:nodoc:` anyway).
680
+ * Removed no longer needed `#:nodoc:` directives from timezone data files (which
624
681
  are now excluded from the rdoc build).
625
- * Installation of the gem now causes rdoc API documentation to be generated.
682
+ * Installation of the gem now causes rdoc API documentation to be generated.
626
683
  #4905.
627
684
  * When optimizing transitions to generate zone definitions, check the
628
685
  UTC and standard offsets separately rather than just the total offset to UTC.
629
- Fixes an incorrect abbreviation issue with Europe/London, Europe/Dublin and
686
+ Fixes an incorrect abbreviation issue with Europe/London, Europe/Dublin and
630
687
  Pacific/Auckland.
631
- * Eliminated unnecessary .nil? calls to give a minor performance gain.
632
- * Timezone.all and Timezone.all_identifiers now return all the
633
- Timezones/identifiers rather than just those associated with countries. #4146.
634
- * Added all_data_zones, all_data_zone_identifiers, all_linked_zones and
635
- all_linked_zone_identifiers class methods to Timezone.
636
- * Added a strftime method to Timezone that converts a time in UTC to local
637
- time and then returns it formatted. %Z is replaced with the Timezone
688
+ * Eliminated unnecessary `.nil?` calls to give a minor performance gain.
689
+ * `Timezone.all` and `Timezone.all_identifiers` now return all the
690
+ `Timezone` instances/identifiers rather than just those associated with
691
+ countries. #4146.
692
+ * Added `all_data_zones`, `all_data_zone_identifiers`, `all_linked_zones` and
693
+ `all_linked_zone_identifiers` class methods to `Timezone`.
694
+ * Added a `strftime` method to `Timezone` that converts a time in UTC to local
695
+ time and then returns it formatted. `%Z` is replaced with the timezone
638
696
  abbreviation for the given time (for example, EST or EDT). #4143.
639
- * Fix escaping of quotes in TZDataParser. This affected country names and
640
- descriptions of timezones within countries.
697
+ * Fix escaping of quotes in `TZDataParser`. This affected country names and
698
+ descriptions of time zones within countries.
641
699
 
642
700
 
643
- Version 0.2.2 (tzdata v2006g) - 17-May-2006
644
- -------------------------------------------
701
+ ## Version 0.2.2 (tzdata v2006g) - 17-May-2006
645
702
 
646
- * Use class-scoped instance variables to store the Timezone identifier and
703
+ * Use class-scoped instance variables to store the Timezone identifier and
647
704
  singleton instance. Loading a linked zone no longer causes the parent
648
705
  zone's identifier to be changed. The instance method of a linked zone class
649
706
  also now returns an instance of the linked zone class rather than the parent
@@ -652,173 +709,170 @@ Version 0.2.2 (tzdata v2006g) - 17-May-2006
652
709
  zone identifier.
653
710
  * The zdumptestall utility now exits if not supplied with enough parameters.
654
711
  * Updated to tzdata version 2006g
655
- (https://mm.icann.org/pipermail/tz/2006-May/013590.html).
712
+ (<https://mm.icann.org/pipermail/tz/2006-May/013590.html>).
656
713
 
657
714
 
658
- Version 0.2.1 (tzdata v2006d) - 17-Apr-2006
659
- -------------------------------------------
715
+ ## Version 0.2.1 (tzdata v2006d) - 17-Apr-2006
660
716
 
661
- * Fix a performance issue caused in 0.2.0 with Timezone.local_to_utc.
662
- Conversions performed on TimeOrDateTime instances passed to <=> are now
717
+ * Fix a performance issue caused in 0.2.0 with `Timezone.local_to_utc`.
718
+ Conversions performed on `TimeOrDateTime` instances passed to `<=>` are now
663
719
  cached as originally intended. Thanks to Michael Smedberg for spotting this.
664
- * Fix a performance issue with the local_to_utc period search algorithm
720
+ * Fix a performance issue with the `local_to_utc` period search algorithm
665
721
  originally implemented in 0.1.0. The condition that was supposed to cause
666
722
  the search to terminate when enough periods had been found was only being
667
- evaluated in a small subset of cases. Thanks to Michael Smedberg and
723
+ evaluated in a small subset of cases. Thanks to Michael Smedberg and
668
724
  Jamis Buck for reporting this.
669
- * Added abbreviation as an alias for TimezonePeriod.zone_identifier.
725
+ * Added abbreviation as an alias for `TimezonePeriod.zone_identifier`.
670
726
  * Updated to tzdata version 2006d
671
- (https://mm.icann.org/pipermail/tz/2006-April/013517.html).
672
- * Ignore any offset in DateTimes passed in (as is already done for Times).
673
- All of the following now refer to the same UTC time (15:40 on 17 April 2006).
674
- Previously, the DateTime in the second line would have been interpreted
675
- as 20:40.
676
-
727
+ (<https://mm.icann.org/pipermail/tz/2006-April/013517.html>).
728
+ * Ignore any offset in `DateTime` instances passed in (as is already done for
729
+ `Time` instances). All of the following now refer to the same UTC time (15:40 on 17 April 2006). Previously, the `DateTime` in the second line would have been interpreted as 20:40.
730
+
731
+ ```ruby
677
732
  tz.utc_to_local(DateTime.new(2006, 4, 17, 15, 40, 0))
678
733
  tz.utc_to_local(DateTime.new(2006, 4, 17, 15, 40, 0).new_offset(Rational(5, 24)))
679
734
  tz.utc_to_local(Time.utc(2006, 4, 17, 15, 40, 0))
680
735
  tz.utc_to_local(Time.local(2006, 4, 17, 15, 40, 0))
736
+ ```
681
737
 
682
738
 
683
- Version 0.2.0 (tzdata v2006c) - 3-Apr-2006
684
- ------------------------------------------
739
+ ## Version 0.2.0 (tzdata v2006c) - 3-Apr-2006
685
740
 
686
- * Use timestamps rather than DateTime objects in zone files for times between
687
- 1970 and 2037 (the range of Time).
688
- * Don't convert passed in Time objects to DateTime in most cases (provides
741
+ * Use timestamps rather than `DateTime` objects in zone files for times between
742
+ 1970 and 2037 (the range of `Time`).
743
+ * Don't convert passed in `Time` objects to `DateTime` in most cases (provides
689
744
  a substantial performance improvement).
690
- * Allow integer timestamps (time in seconds since 1970-1-1) to be used as well
691
- as Time and DateTime objects in all public methods that take times as
745
+ * Allow integer timestamps (time in seconds since 1970-1-1) to be used as well
746
+ as `Time` and `DateTime` objects in all public methods that take times as
692
747
  parameters.
693
748
  * Tool to compare TZInfo conversions with output from zdump.
694
- * TZDataParser zone generation algorithm rewritten. Now based on the zic code.
749
+ * `TZDataParser` zone generation algorithm rewritten. Now based on the zic code.
695
750
  TZInfo is now 100% compatible with zic/zdump output.
696
751
  * Riyadh Solar Time zones now included again (generation time has been reduced
697
- with TZDataParser changes).
752
+ with `TZDataParser` changes).
698
753
  * Use binary mode when writing zone and country files to get Unix (\n) new
699
754
  lines.
700
755
  * Omit unnecessary quotes in zone identifier symbols.
701
756
  * Omit the final transition to DST if there is a prior transition in the last
702
757
  year processed to standard time.
703
758
  * Updated to tzdata version 2006c
704
- (https://mm.icann.org/pipermail/tz/2006-April/013500.html).
759
+ (<https://mm.icann.org/pipermail/tz/2006-April/013500.html>).
705
760
 
706
761
 
707
- Version 0.1.2 (tzdata v2006a) - 5-Feb-2006
708
- ------------------------------------------
762
+ ## Version 0.1.2 (tzdata v2006a) - 5-Feb-2006
709
763
 
710
764
  * Add lib directory to the load path when tzinfo is required. Makes it easier
711
- to use tzinfo gem when unpacked to vendor directory in rails.
712
- * Updated to tzdata version 2006a
713
- (https://mm.icann.org/pipermail/tz/2006-January/013311.html).
714
- * build_tz_classes rake task now handles running svn add and svn delete as new
715
- timezones and countries are added and old ones are removed.
716
- * Return a better error when attempting to use a Timezone instance that was
717
- constructed with Timezone.new(nil). This will occur when using Rails'
718
- composed_of. When the timezone identifier in the database is null, attempting
719
- to use the Timezone will now result in an UnknownTimezone exception rather
720
- than a NameError.
721
-
722
-
723
- Version 0.1.1 (tzdata v2005q) - 18-Dec-2005
724
- -------------------------------------------
725
-
726
- * Timezones that are defined by a single unbounded period (e.g. UTC) now
765
+ to use tzinfo gem when unpacked to vendor directory in rails.
766
+ * Updated to tzdata version 2006a
767
+ (<https://mm.icann.org/pipermail/tz/2006-January/013311.html>).
768
+ * `build_tz_classes` rake task now handles running svn add and svn delete as new
769
+ time zones and countries are added and old ones are removed.
770
+ * Return a better error when attempting to use a `Timezone` instance that was
771
+ constructed with `Timezone.new(nil)`. This will occur when using Rails'
772
+ `composed_of`. When the timezone identifier in the database is null,
773
+ attempting to use the `Timezone` will now result in an `UnknownTimezone`
774
+ exception rather than a `NameError`.
775
+
776
+
777
+ ## Version 0.1.1 (tzdata v2005q) - 18-Dec-2005
778
+
779
+ * Time zones that are defined by a single unbounded period (e.g. UTC) now
727
780
  work again.
728
781
  * Updated to tzdata version 2005q.
729
782
 
730
783
 
731
- Version 0.1.0 (tzdata v2005n) - 27-Nov-2005
732
- -------------------------------------------
784
+ ## Version 0.1.0 (tzdata v2005n) - 27-Nov-2005
733
785
 
734
- * period_for_local and local_to_utc now allow resolution of ambiguous
735
- times (e.g. when switching from daylight savings to standard time).
786
+ * `period_for_local` and `local_to_utc` now allow resolution of ambiguous
787
+ times (e.g. when switching from daylight savings to standard time).
736
788
  The behaviour of these methods when faced with an ambiguous local time
737
789
  has now changed. If you are using these methods you should check
738
790
  the documentation. Thanks to Cliff Matthews for suggesting this change.
739
- * Added require 'date' to timezone.rb (date isn't loaded by default in all
791
+ * Added `require 'date'` to `timezone.rb` (date isn't loaded by default in all
740
792
  environments).
741
793
  * Use rake to build packages and documentation.
742
794
  * License file is now included in gem distribution.
743
795
  * Dates in definitions stored as Astronomical Julian Day numbers rather than
744
- as civil dates (improves performance creating DateTime instances).
745
- * Added options to TZDataParser to allow generation of specific zones and
796
+ as civil dates (improves performance creating `DateTime` instances).
797
+ * Added options to `TZDataParser` to allow generation of specific zones and
746
798
  countries.
747
- * Moved TimezonePeriod class to timezone_period.rb.
748
- * New TimezonePeriodList class to store TimezonePeriods for a timezone and
749
- perform searches for periods.
750
- * Timezones now defined using blocks. TimezonePeriods are only instantiated
751
- when they are needed. Thanks to Jamis Buck for the suggestion.
752
- * Add options to TZDataParser to allow exclusion of specific zones and
799
+ * Moved `TimezonePeriod` class to `timezone_period.rb`.
800
+ * New `TimezonePeriodList` class to store `TimezonePeriod` instances for a
801
+ timezone and perform searches for periods.
802
+ * Time zones are now defined using blocks. `TimezonePeriod` instances are only
803
+ created when they are needed. Thanks to Jamis Buck for the suggestion.
804
+ * Add options to `TZDataParser` to allow exclusion of specific zones and
753
805
  countries.
754
806
  * Exclude the Riyadh Solar Time zones. The rules are only for 1987 to 1989 and
755
807
  take a long time to generate and process. Riyadh Solar Time is no longer
756
808
  observed.
757
- * The last TimezonePeriod for each Timezone is now written out with an
809
+ * The last `TimezonePeriod` for each `Timezone` is now written out with an
758
810
  unbounded rather than arbitrary end time.
759
- * Construct the Rational offset in TimezonePeriod once when the TimezonePeriod
760
- is constructed rather than each time it is needed.
761
- * Timezone and Country now keep a cache of loaded instances to avoid running
762
- require which can be slow on some platforms.
811
+ * Construct the `Rational` offset in `TimezonePeriod` once when the
812
+ `TimezonePeriod` is constructed rather than each time it is needed.
813
+ * `Timezone` and `Country` now keep a cache of loaded instances to avoid running
814
+ `require` which can be slow on some platforms.
763
815
  * Updated to tzdata version 2005n.
764
816
 
765
817
 
766
- Version 0.0.4 (tzdata v2005m) - 18-Sep-2005
767
- -------------------------------------------
818
+ ## Version 0.0.4 (tzdata v2005m) - 18-Sep-2005
768
819
 
769
820
  * Removed debug output accidentally included in the previous release.
770
821
  * Fixed a bug in the generation of friendly zone identifiers (was inserting
771
822
  apostrophes into UTC, GMT, etc).
772
- * Fixed Country <=> operator (was comparing non-existent attribute)
773
- * Fixed Timezone.period_for_local error when period not found.
774
- * Added testcases for Timezone, TimezoneProxy, TimezonePeriod, Country and
775
- some selected timezones.
776
-
777
-
778
- Version 0.0.3 (tzdata v2005m) - 17-Sep-2005
779
- -------------------------------------------
780
-
781
- * Reduced visibility of some methods added in Timezone#setup and Country#setup.
782
- * Added name method to Timezone (returns the identifier).
783
- * Added friendly_identifier method to Timezone. Returns a more friendly version
784
- of the identifier.
785
- * Added to_s method to Timezone. Returns the friendly identifier.
786
- * Added == and <=> operators to Timezone (compares identifiers).
787
- * Timezone now includes Comparable.
788
- * Added to_s method to Country.
789
- * Added == and <=> operators to Country (compares ISO 3166 country codes).
790
- * Country now includes Comparable.
791
- * New TimezoneProxy class that behaves the same as a Timezone but doesn't
823
+ * Fixed `Country` `<=>` operator (was comparing non-existent attribute)
824
+ * Fixed `Timezone.period_for_local` error when period not found.
825
+ * Added test cases for `Timezone`, `TimezoneProxy`, `TimezonePeriod`, `Country`
826
+ and some selected time zones.
827
+
828
+
829
+ ## Version 0.0.3 (tzdata v2005m) - 17-Sep-2005
830
+
831
+ * Reduced visibility of some methods added in `Timezone#setup` and
832
+ `Country#setup`.
833
+ * Added `name` method to `Timezone` (returns the identifier).
834
+ * Added `friendly_identifier` method to `Timezone`. Returns a more friendly
835
+ version of the identifier.
836
+ * Added `to_s` method to `Timezone`. Returns the friendly identifier.
837
+ * Added `==` and `<=>` operators to `Timezone` (compares identifiers).
838
+ * `Timezone` now includes `Comparable`.
839
+ * Added `to_s` method to `Country`.
840
+ * Added `==` and `<=>` operators to `Country` (compares ISO 3166 country codes).
841
+ * `Country` now includes `Comparable`.
842
+ * New `TimezoneProxy` class that behaves the same as a `Timezone` but doesn't
792
843
  actually load in its definition until it is actually required.
793
- * Modified Timezone and Country methods that return Timezones to return
794
- TimezoneProxy instances instead. This makes these methods much quicker.
795
-
796
- In Ruby on Rails, you can now show a drop-down list of all timezones using the
797
- Rails time_zone_select helper method:
798
-
799
- <%= time_zone_select 'user', 'time_zone', TZInfo::Timezone.all.sort, :model => TZInfo::Timezone %>
800
-
801
-
802
- Version 0.0.2 (tzdata v2005m) - 13-Sep-2005
803
- -------------------------------------------
804
-
805
- * Country and Timezone data is now loaded into class rather than instance
806
- variables. This makes Timezone links more efficient and saves memory if
807
- creating specific Timezone and Country classes directly.
808
- * TimezonePeriod zone_identifier is now defined as a symbol to save memory
844
+ * Modified `Timezone` and `Country` methods that return `Timezone` instances to
845
+ return `TimezoneProxy` instances instead. This makes these methods much
846
+ quicker.
847
+
848
+ In Ruby on Rails, you can now show a drop-down list of all time zones using the
849
+ Rails `time_zone_select` helper method:
850
+
851
+ ```ruby
852
+ <%= time_zone_select 'user', 'time_zone', TZInfo::Timezone.all.sort, :model => TZInfo::Timezone %>
853
+ ```
854
+
855
+
856
+ ## Version 0.0.2 (tzdata v2005m) - 13-Sep-2005
857
+
858
+ * `Country` and `Timezone` data is now loaded into class rather than instance
859
+ variables. This makes `Timezone` links more efficient and saves memory if
860
+ creating specific `Timezone` and `Country` classes directly.
861
+ * `TimezonePeriod` `zone_identifier` is now defined as a symbol to save memory
809
862
  (was previously a string).
810
- * TimezonePeriod zone_identifiers that were previously '' are now :Unknown.
811
- * Timezones and Countries can now be returned using Timezone.new(identifier)
812
- and Country.new(identifier). When passed an identifier, the new method
813
- calls get to return an instance of the specified timezone or country.
814
- * Added new class methods to Timezone to return sets of zones and identifiers.
863
+ * `TimezonePeriod` `zone_identifier`s that were previously `''` are now
864
+ `:Unknown`.
865
+ * `Timezone` and `Country` instances can now be returned using
866
+ `Timezone.new(identifier)` and `Country.new(identifier)`. When passed an
867
+ identifier, the `new` method calls `get` to return an instance of the
868
+ specified timezone or country.
869
+ * Added new class methods to `Timezone` to return sets of zones and identifiers.
815
870
 
816
871
  Thanks to Scott Barron of Lunchbox Software for the suggestions in his
817
- article about using TZInfo with Rails
818
- (https://web.archive.org/web/20060425190845/http://lunchroom.lunchboxsoftware.com/pages/tzinfo_rails)
872
+ article about using TZInfo with Rails
873
+ (<https://web.archive.org/web/20060425190845/http://lunchroom.lunchboxsoftware.com/pages/tzinfo_rails>)
819
874
 
820
875
 
821
- Version 0.0.1 (tzdata v2005m) - 29-Aug-2005
822
- -------------------------------------------
876
+ ## Version 0.0.1 (tzdata v2005m) - 29-Aug-2005
823
877
 
824
878
  * First release.