tzinfo 1.2.10 → 2.0.5

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