./time/ruby-tzinfo, Daylight savings aware timezone library

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version: 2.0.0, Package name: ruby24-tzinfo-2.0.0, Maintainer: taca

TZInfo provides daylight savings aware transformations between times in
different timezones.

Data Sources

TZInfo requires a source of timezone data. There are two built-in options:

1. The TZInfo::Data library (the tzinfo-data gem). TZInfo::Data contains a set
of Ruby modules that are generated from the [IANA Time Zone Database](http://www.iana.org/time-zones).
2. A zoneinfo directory. Most Unix-like systems include a zoneinfo directory
containing timezone definitions. These are also generated from the
[IANA Time Zone Database](http://www.iana.org/time-zones).

By default, TZInfo::Data will be used. If TZInfo::Data is not available (i.e.
if `require 'tzinfo/data'` fails), then TZInfo will search for a zoneinfo
directory instead (using the search path specified by

If no data source can be found, a `TZInfo::DataSourceNotFound` exception will be
raised when TZInfo is used. Further information is available
[in the wiki](http://tzinfo.github.io/datasourcenotfound) to help with
resolving `TZInfo::DataSourceNotFound` errors.

The default data source selection can be overridden using

Custom data sources can also be used. See `TZInfo::DataSource.set` for
further details.

Required to run:
[misc/ruby-thread_safe] [lang/ruby24-base]

Required to build:

Master sites:

SHA1: 5129e92eab9c5e6e2453e1c7b56686b97829ffe6
RMD160: e11529fdc152d44b056ef21b45a3851add269f16
Filesize: 68.5 KB

Version history: (Expand)

CVS history: (Expand)

   2019-02-03 16:27:53 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
time/ruby-tzinfo: update to 2.0.0

2.0.0 (2018-12-26)


* to_local and period_for instance methods have been added to TZInfo::Timezone. \ 
These are similar to utc_to_local and period_for_utc, but take the UTC offset of \ 
the given time into account.
* abbreviation, dst?, base_utc_offset and observed_utc_offset instance methods \ 
have been added to TZInfo::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 with TZInfo::Timezone \ 
in place of a Time or DateTime.
* local_time, local_datetime and local_timestamp instance methods have been \ 
added to TZInfo::Timezone. These methods construct local Time, DateTime and \ 
TZInfo::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.


* 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 or \ 
TZInfo::TimestampWithOffset. These classes subclass Time, DateTime and \ 
TZInfo::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 with \ 
* The transitions_up_to, offsets_up_to and strftime instance methods of \ 
TZInfo::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 and TZInfo::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 and \ 
TZInfo::TimezonePeriod#zone_identifier now return frozen String instances \ 
instead of instances of Symbol.
* The utc_offset and utc_total_offset attributes of TZInfo::TimezonePeriod and \ 
TZInfo::TimezoneOffset have been renamed base_utc_offset and observed_utc_offset \ 
respectively. The former names have been retained as aliases.
* TZInfo::Timezone.get, TZInfo::Timezone.get_proxy and TZInfo::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 \ 
* The full range of transitions is now loaded from zoneinfo files. Zoneinfo \ 
files produced with version 2014c of the zic tool contain an initial transition \ 
2**63 seconds before the epoch. Zoneinfo files produced with version 2014d or \ 
later of zic contain an initial transition 2**59 seconds before the epoch. These \ 
transitions would previously have been ignored, but are now returned in methods \ 
such as TZInfo::Timezone#transitions_up_to.
* The TZInfo::RubyDataSource and TZInfo::ZoneinfoDataSource classes have been \ 
moved into a new TZInfo::DataSources module. Code that is setting \ 
TZInfo::ZoneinfoDataSource.search_path or \ 
TZInfo::ZoneinfoDataSource.alternate_iso3166_tab_search_path will need to be \ 
updated accordingly.
* The TZInfo::InvalidZoneinfoDirectory and TZInfo::ZoneinfoDirectoryNotFound \ 
exception classes raised by TZInfo::DataSources::ZoneinfoDataSource have been \ 
moved into the TZInfo::DataSources module.
* Setting the data source to :ruby or instantiating \ 
TZInfo::DataSources::RubyDataSource will now immediately raise a \ 
TZInfo::DataSources::TZInfoDataNotFound exception if require 'tzinfo/data' \ 
fails. Previously, a failure would only occur later when accessing an index or \ 
loading a timezone or country.
constants of TZInfo::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 and TZInfo::Timezone.data_source methods have been \ 
made private.
* The performance of loading zoneinfo files and the associated indexes has been \ 
* 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 the TZInfo::DataSources \ 
* The TZInfo::TransitionDataTimezoneInfo class has been removed and replaced \ 
with TZInfo::DataSources::TransitionsDataTimezoneInfo and \ 
TZInfo::DataSources::ConstantOffsetDataTimezoneInfo. \ 
TZInfo::DataSources::TransitionsDataTimezoneInfo is constructed with an Array of \ 
TZInfo::TimezoneTransition instances representing times when the offset changes. \ 
TZInfo::DataSources::ConstantOffsetDataTimezoneInfo is constructed with a \ 
TZInfo::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 from TZInfo::DataSource#data_timezone_identifiers \ 
and TZInfo::DataSource#linked_timezone_identifiers.
* The results of the TZInfo::DataSources::RubyDataSource to_s and inspect \ 
methods now include the time zone database and tzinfo-data versions.


* Methods of TZInfo::Timezone that accept time arguments no longer allow Integer \ 
timestamp values. Time, DateTime or TZInfo::Timestamp values or objects that \ 
respond to to_i, subsec and optionally utc_offset must be used instead.
* The %:::z format directive can now only be used with TZInfo::Timezone#strftime \ 
if it is supported by Time#strftime on the runtime platform.
* Using TZInfo::Timezone.new(identifier) and TZInfo::Country.new(code) to obtain \ 
a specific TZInfo::Timezone or TZInfo::Country will no longer work. \ 
TZInfo::Timezone.get(identifier) and TZInfo::Country.get(code) should be used \ 
* The TZInfo::TimeOrDateTime class has been removed.
* The valid_for_utc?, utc_after_start?, utc_before_end?, valid_for_local?, \ 
local_after_start? and local_before_end? instance methods of \ 
TZInfo::TimezonePeriod have been removed. Comparisons can be performed with the \ 
results of the starts_at, ends_at, local_starts_at and local_ends_at methods \ 
* The to_local and to_utc instance methods of TZInfo::TimezonePeriod and \ 
TZInfo::TimezoneOffset have been removed. Conversions should be performed using \ 
the TZInfo::Timezone class instead.
* The TZInfo::TimezonePeriod#utc_total_offset_rational method has been removed. \ 
Equivalent information can be obtained using the \ 
TZInfo::TimezonePeriod#observed_utc_offset method.
* The datetime, time, local_end, local_end_time, local_start and \ 
local_start_time instance methods of TZInfo::TimezoneTransition have been \ 
removed. The at, local_end_at and local_start_at methods should be used instead \ 
and the result (a TZInfo::TimestampWithOffset) converted to either a DateTime or \ 
Time by calling to_datetime or to_time on the result.
* The us_zones and us_zone_identifiers class methods of TZInfo::Timezone have \ 
been removed. TZInfo::Country.get('US').zones and \ 
TZInfo::Country.get('US').zone_identifiers should be used instead.
   2019-01-02 15:44:48 by Takahiro Kambe | Files touched by this commit (1)
Log message:
time/ruby-tzinfo: add USE_LANGUAGES=

Add "USE_LANGUAGES=	# none".
   2018-02-28 16:10:02 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
time/ruby-tzinfo: update to 1.2.5

Version 1.2.5 - 4-Feb-2018

* Support recursively (deep) freezing Country and Timezone instances. #80.
* Allow negative daylight savings time offsets to be derived when reading from
  zoneinfo files. The utc_offset and std_offset are now derived correctly for
  Europe/Dublin in the 2018a and 2018b releases of the Time Zone Database.
   2017-12-24 11:16:53 by Thomas Klausner | Files touched by this commit (1)
Log message:
ruby-tzinfo: follow redirect
   2017-10-31 16:46:33 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
time/ruby-tzinfo: Update to 1.2.4

* Ignore the leapseconds file that is included in zoneinfo directories
  installed with version 2017c and later of the Time Zone Database.
   2017-04-15 17:11:23 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
Update ruby-tzinfo to 1.2.3.

v1.2.3							2017/3/25

* Reduce the number of String objects allocated when loading zoneinfo
  files. #54.
* Make Timezone#friendly_identifier compatible with frozen string literals.
* Improve the algorithm for deriving the utc_offset from zoneinfo files. This
  now correctly handles Pacific/Apia switching from one side of the
  International Date Line to the other whilst observing daylight savings
  time. #66.
* Fix an UnknownTimezone exception when calling transitions_up_to or
  offsets_up_to on a TimezoneProxy instance obtained from Timezone.get_proxy.
* Allow the Factory zone to be obtained from the Zoneinfo data source.
* Ignore the /usr/share/zoneinfo/timeconfig symlink included in Slackware
  distributions. #64.
* Fix Timezone#strftime handling of %Z expansion when %Z is prefixed with more
  than one percent. #31.
* Support expansion of %z, %:z, %::z and %:::z to the UTC offset of the time
  zone in Timezone#strftime. #31 and #67.
   2016-01-03 06:17:23 by Takahiro Kambe | Files touched by this commit (4) | Package updated
Log message:
Update ruby-tzinfo to 1.2.2.

Version 1.2.2 - 8-Aug-2014

* Fix an error with duplicates being returned by Timezone#all_country_zones
  and Timezone#all_country_zone_identifiers when used with tzinfo-data
  v1.2014.6 or later.
* Use the zone1970.tab file for country timezone data if it is found in the
  zoneinfo directory (and fallback to zone.tab if not). zone1970.tab was added
  in tzdata 2014f. zone.tab is now deprecated.

Version 1.2.1 - 1-Jun-2014

* Support zoneinfo files generated with zic version 2014c and later.
* On platforms that only support positive 32-bit timestamps, ensure that
  conversions are accurate from the epoch instead of just from the first
  transition after the epoch.
* Minor documentation improvements.

Version 1.2.0 - 26-May-2014

* Raise the minimum supported Ruby version to 1.8.7.
* Support loading system zoneinfo data on FreeBSD, OpenBSD and Solaris.
  Resolves #15.
* Add canonical_identifier and canonical_zone methods to Timezone. Resolves #16.
* Add a link to a DataSourceNotFound help page in the TZInfo::DataSourceNotFound
  exception message.
* Load iso3166.tab and zone.tab files as UTF-8.
* Fix Timezone#local_to_utc returning local Time instances on systems using UTC
  as the local time zone. Resolves #13.
* Fix == methods raising an exception when passed an instance of a different
  class by making <=> return nil if passed a non-comparable argument.
* Eliminate "require 'rational'" warnings. Resolves #10.
* Eliminate "assigned but unused variable - info" warnings. Resolves #11.
* Switch to minitest v5 for unit tests. Resolves #18.

Version 1.1.0 - 25-Sep-2013

* TZInfo is now thread safe. ThreadSafe::Cache is now used instead of Hash
  to cache Timezone and Country instances returned by Timezone.get and
  Country.get. The tzinfo gem now depends on thread_safe ~> 0.1.
* Added a transitions_up_to method to Timezone that returns a list of the times
  where the UTC offset of the timezone changes.
* Added an offsets_up_to method to Timezone that returns the set of offsets
  that have been observed in a defined timezone.
* Fixed a "can't modify frozen String" error when loading a Timezone from a
  zoneinfo file using an identifier String that is both tainted and frozen.
  Resolves #3.
* Support TZif3 format zoneinfo files (now produced by zic from tzcode version
  2013e onwards).
* Support using YARD to generate documentation (added a .yardopts file).
* Ignore the +VERSION file included in the zoneinfo directory on Mac OS X.
* Added a note to the documentation concerning 32-bit zoneinfo files (as
  included with Mac OS X).

Version 1.0.1 - 22-Jun-2013

* Fix a test case failure when tests are run from a directory that contains a
  dot in the path (issue #29751).

Version 1.0.0 - 2-Jun-2013

* Allow TZInfo to be used with different data sources instead of just the
  built-in Ruby module data files.
* Include a data source that allows TZInfo to load data from the binary
  zoneinfo files produced by zic and included with many Linux and Unix-like
* Remove the definition and index Ruby modules from TZInfo and move them into
  a separate TZInfo::Data library (available as the tzinfo-data gem).
* Default to using the TZInfo::Data library as the data source if it is
  installed, otherwise use zoneinfo files instead.
* Preserve the nanoseconds of local timezone Time objects when performing
  conversions (issue #29705).
* Don't add the tzinfo lib directory to the search path when requiring 'tzinfo'.
  The tzinfo lib directory must now be in the search path before 'tzinfo' is
* Add utc_start_time, utc_end_time, local_start_time and local_end_time instance
  methods to TimezonePeriod. These return an identical value as the existing
  utc_start, utc_end, local_start and local_end methods, but return Time
  instances instead of DateTime.
* Make the start_transition, end_transition and offset properties of
  TimezonePeriod protected. To access properties of the period, callers should
  use other TimezonePeriod instance methods instead (issue #7655).
   2015-12-12 18:27:43 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
Update ruby-tzinfo to 0.3.46.

== Version 0.3.46 (tzdata v2015g) - 02-Dec-2015

* From version 2015e, the IANA time zone database uses non-ASCII characters in
  country names. Backport the encoding handling from TZInfo::Data to allow
  TZInfo 0.3.x to support Ruby 1.9 (which would otherwise fail with an invalid
  byte sequence error when loading the countries index). Resolves #41.