All Versions
92
Latest Version
Avg Release Cycle
239 days
Latest Release
972 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v2.0.5 Changes
July 19, 2022- ๐ Changed
DateTime
results to always use the proleptic Gregorian calendar. This affectsDateTime
results prior to 1582-10-15 and any arithmetic performed on the results that would produce a secondary result prior to 1582-10-15. - โ Added support for eager loading all the time zone and country data by calling
either
TZInfo::DataSource#eager_load!
orTZInfo.eager_load!
. Compatible with Ruby On Rails'eager_load_namespaces
. #129. - ๐ Ignore the SECURITY file from Arch Linux's tzdata package. #134.
- ๐ Changed
-
v2.0.4 Changes
December 16, 2020- ๐ Fixed an incorrect
InvalidTimezoneIdentifier
exception raised when loading a zoneinfo file that includes rules specifying an additional transition to the final defined offset (for example, Africa/Casablanca in version 2018e of the Time Zone Database). #123.
- ๐ Fixed an incorrect
-
v2.0.3 Changes
November 08, 2020- โ Added support for handling "slim" format zoneinfo files that are produced by default by zic version 2020b and later. The POSIX-style TZ string is now used calculate DST transition times after the final defined transition in the file. #120.
- ๐ Fixed
TimeWithOffset#getlocal
returning aTimeWithOffset
with thetimezone_offset
still assigned when called with an offset argument on JRuby 9.3. - ๐ Rubinius is no longer supported.
-
v2.0.2 Changes
April 02, 2020- ๐ Fixed 'wrong number of arguments' errors when running on JRuby 9.0. #114.
- ๐ Fixed warnings when running on Ruby 2.8. #113.
-
v2.0.1 Changes
December 24, 2019- ๐ Fixed "SecurityError: Insecure operation - require" exceptions when loading data with recent Ruby releases in safe mode. #100.
- ๐ Fixed warnings when running on Ruby 2.7. #109.
- โ Add a
TZInfo::Timezone#=~
method that performs a regex match on the time zone identifier. #99. - โ Add a
TZInfo::Country#=~
method that performs a regex match on the country code.
-
v2.0.0 Changes
December 26, 2018โ Added
to_local
andperiod_for
instance methods have been added toTZInfo::Timezone
. These are similar toutc_to_local
andperiod_for_utc
, but take the UTC offset of the given time into account.abbreviation
,dst?
,base_utc_offset
andobserved_utc_offset
instance methods have been added toTZInfo::Timezone
, returning the abbreviation, whether daylight savings time is in effect and the UTC offset of the time zone at a specified time.- A
TZInfo::Timestamp
class has been added. It can be used withTZInfo::Timezone
in place of aTime
orDateTime
. local_time
,local_datetime
andlocal_timestamp
instance methods have been added toTZInfo::Timezone
. These methods construct localTime
,DateTime
andTZInfo::Timestamp
instances with the correct UTC offset and abbreviation for the time zone.- ๐ Support for a (yet to be released) version 2 of tzinfo-data has been added, in
addition to support for version 1. The new version will remove the (no longer
needed)
DateTime
parameters from transition times, reduce memory consumption and improve the efficiency of loading timezone and country indexes. - A
TZInfo::VERSION
constant has been added, indicating the TZInfo version number.
๐ Changed
- ๐ The minimum supported Ruby versions are now Ruby MRI 1.9.3, JRuby 1.7 (in 1.9 or later mode) and Rubinius 3.
- Local times are now returned using the correct UTC offset (instead of using UTC). #49 and #52.
- Local times are returned as instances of
TimeWithOffset
,DateTimeWithOffset
orTZInfo::TimestampWithOffset
. These classes subclassTime
,DateTime
andTZInfo::Timestamp
respectively. They override the default behaviour of the base classes to return information about the observed offset at the indicated time. For example, the zone abbreviation is returned when using the%Z
directive withstrftime
. - The
transitions_up_to
,offsets_up_to
andstrftime
instance methods ofTZInfo::Timezone
now take the UTC offsets of given times into account (instead of ignoring them as was previously the case). - The
TZInfo::TimezonePeriod
class has been split into two subclasses:TZInfo::OffsetTimezonePeriod
andTZInfo::TransitionsTimezonePeriod
.TZInfo::OffsetTimezonePeriod
is returned for time zones that only have a single offset.TZInfo::TransitionsTimezonePeriod
is returned for periods that start or end with a transition. TZInfo::TimezoneOffset#abbreviation
,TZInfo::TimezonePeriod#abbreviation
andTZInfo::TimezonePeriod#zone_identifier
now return frozenString
instances instead of instances ofSymbol
.- The
utc_offset
andutc_total_offset
attributes ofTZInfo::TimezonePeriod
andTZInfo::TimezoneOffset
have been renamedbase_utc_offset
andobserved_utc_offset
respectively. The former names have been retained as aliases. TZInfo::Timezone.get
,TZInfo::Timezone.get_proxy
andTZInfo::Country.get
can now be used with strings having any encoding. Previously, only encodings that are directly comparable with UTF-8 were supported.- The requested identifier is included in
TZInfo::InvalidTimezoneIdentifier
exception messages. - The requested country code is included in
TZInfo::InvalidCountryCode
exception messages. - The full range of transitions is now loaded from zoneinfo files. Zoneinfo
files produced with version 2014c of the
zic
tool contain an initial transition2**63
seconds before the epoch. Zoneinfo files produced with version 2014d or later ofzic
contain an initial transition2**59
seconds before the epoch. These transitions would previously have been ignored, but are now returned in methods such asTZInfo::Timezone#transitions_up_to
. - ๐ The
TZInfo::RubyDataSource
andTZInfo::ZoneinfoDataSource
classes have been moved into a newTZInfo::DataSources
module. Code that is settingTZInfo::ZoneinfoDataSource.search_path
orTZInfo::ZoneinfoDataSource.alternate_iso3166_tab_search_path
will need to be updated accordingly. - The
TZInfo::InvalidZoneinfoDirectory
andTZInfo::ZoneinfoDirectoryNotFound
exception classes raised byTZInfo::DataSources::ZoneinfoDataSource
have been moved into theTZInfo::DataSources
module. - ๐ Setting the data source to
:ruby
or instantiatingTZInfo::DataSources::RubyDataSource
will now immediately raise aTZInfo::DataSources::TZInfoDataNotFound
exception ifrequire 'tzinfo/data'
fails. Previously, a failure would only occur later when accessing an index or loading a timezone or country. - The
DEFAULT_SEARCH_PATH
andDEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH
constants ofTZInfo::DataSources::ZoneinfoDataSource
have been made private. - The
TZInfo::Country.data_source
,TZInfo::DataSource.create_default_data_source
,TZInfo::DataSources::ZoneinfoDataSource.process_search_path
,TZInfo::Timezone.get_proxies
andTZInfo::Timezone.data_source
methods have been made private. - ๐ The performance of loading zoneinfo files and the associated indexes has been improved.
- Memory use has been decreased by deduplicating
String
instances when loading country and time zone data. - ๐ The dependency on the deprecated thread_safe gem as been removed and replaced by concurrent-ruby.
- The Info classes used to return time zone and country information from
TZInfo::DataSource
implementations have been moved into theTZInfo::DataSources
module. - ๐ The
TZInfo::TransitionDataTimezoneInfo
class has been removed and replaced withTZInfo::DataSources::TransitionsDataTimezoneInfo
andTZInfo::DataSources::ConstantOffsetDataTimezoneInfo
.TZInfo::DataSources::TransitionsDataTimezoneInfo
is constructed with anArray
ofTZInfo::TimezoneTransition
instances representing times when the offset changes.TZInfo::DataSources::ConstantOffsetDataTimezoneInfo
is constructed with aTZInfo::TimezoneOffset
instance representing the offset constantly observed in a time zone. - The
TZInfo::DataSource#timezone_identifiers
method should no longer be overridden in custom data source implementations. The implementation in the base class now calculates a result fromTZInfo::DataSource#data_timezone_identifiers
andTZInfo::DataSource#linked_timezone_identifiers
. - ๐ The results of the
TZInfo::DataSources::RubyDataSource
to_s
andinspect
methods now include the time zone database and tzinfo-data versions.
โ Removed
- Methods of
TZInfo::Timezone
that accept time arguments no longer allowInteger
timestamp values.Time
,DateTime
orTZInfo::Timestamp
values or objects that respond toto_i
,subsec
and optionallyutc_offset
must be used instead. - The
%:::z
format directive can now only be used withTZInfo::Timezone#strftime
if it is supported byTime#strftime
on the runtime platform. - Using
TZInfo::Timezone.new(identifier)
andTZInfo::Country.new(code)
to obtain a specificTZInfo::Timezone
orTZInfo::Country
will no longer work.TZInfo::Timezone.get(identifier)
andTZInfo::Country.get(code)
should be used instead. - ๐ The
TZInfo::TimeOrDateTime
class has been removed. - The
valid_for_utc?
,utc_after_start?
,utc_before_end?
,valid_for_local?
,local_after_start?
andlocal_before_end?
instance methods ofTZInfo::TimezonePeriod
have been removed. Comparisons can be performed with the results of thestarts_at
,ends_at
,local_starts_at
andlocal_ends_at
methods instead. - The
to_local
andto_utc
instance methods ofTZInfo::TimezonePeriod
andTZInfo::TimezoneOffset
have been removed. Conversions should be performed using theTZInfo::Timezone
class instead. - The
TZInfo::TimezonePeriod#utc_total_offset_rational
method has been removed. Equivalent information can be obtained using theTZInfo::TimezonePeriod#observed_utc_offset
method. - The
datetime
,time
,local_end
,local_end_time
,local_start
andlocal_start_time
instance methods ofTZInfo::TimezoneTransition
have been removed. Theat
,local_end_at
andlocal_start_at
methods should be used instead and the result (aTZInfo::TimestampWithOffset
) converted to either aDateTime
orTime
by callingto_datetime
orto_time
on the result. - The
us_zones
andus_zone_identifiers
class methods ofTZInfo::Timezone
have been removed.TZInfo::Country.get('US').zones
andTZInfo::Country.get('US').zone_identifiers
should be used instead.
-
v1.2.10 Changes
- ๐ Fixed a relative path traversal bug that could cause arbitrary files to be
loaded with
require
when used withRubyDataSource
. Please refer to https://github.com/tzinfo/tzinfo/security/advisories/GHSA-5cm2-9h8c-rvfx for details. CVE-2022-31163. - ๐ Ignore the SECURITY file from Arch Linux's tzdata package. #134.
- ๐ Fixed a relative path traversal bug that could cause arbitrary files to be
loaded with
-
v1.2.9 Changes
December 16, 2020- ๐ Fixed an incorrect
InvalidTimezoneIdentifier
exception raised when loading a zoneinfo file that includes rules specifying an additional transition to the final defined offset (for example, Africa/Casablanca in version 2018e of the Time Zone Database). #123.
- ๐ Fixed an incorrect
-
v1.2.8 Changes
November 08, 2020- โ Added support for handling "slim" format zoneinfo files that are produced by default by zic version 2020b and later. The POSIX-style TZ string is now used calculate DST transition times after the final defined transition in the file. The 64-bit section is now always used regardless of whether Time has support for 64-bit times. #120.
- ๐ Rubinius is no longer supported.
-
v1.2.7 Changes
April 02, 2020- ๐ Fixed 'wrong number of arguments' errors when running on JRuby 9.0. #114.
- ๐ Fixed warnings when running on Ruby 2.8. #112.