tzinfo 1.2.3 → 2.0.1

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