tzinfo 1.2.1 → 2.0.5

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