tzinfo 1.2.11 → 2.0.6

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