- New timezone data format. Timezone data now occupies less space on disk and takes less memory once loaded. #4142, #4144.
- Timezone data is defined in modules rather than classes.
Timezone
instances returned byTimezone.get
are no longer instances of data classes, but are instead instances of newDataTimezone
andLinkedTimezone
classes. Timezone
instances can now be used withMarshal.dump
andMarshal.load
. #4240.- Added a
Timezone.get_proxy
method that returns aTimezoneProxy
object for a given identifier. - Country index data is now defined in a single module that is independent of the
Country
class implementation. Country
instances can now be used withMarshal.dump
andMarshal.load
. #4240.Country
has a newzone_info
method that returnsCountryTimezone
objects containing additional information (latitude, longitude and a description) relating to eachTimezone
. #4140.- Time zones within a
Country
are now returned in an order that makes geographic sense. - The zdumptest utility now checks local to utc conversions in addition to utc to local conversions.
eql?
method defined onCountry
andTimezone
that is equivalent to==
.==
method ofTimezone
no longer raises an exception when passed an object with no identifier method.==
method ofCountry
no longer raises an exception when passed an object with no code method.hash
method defined onCountry
that returns the hash of the code.hash
method defined onTimezone
that returns the hash of the identifier.- Miscellaneous API documentation corrections and improvements.
- Timezone definition and indexes are now excluded from rdoc (the contents were previously ignored with
#:nodoc:
anyway). - Removed no longer needed
#:nodoc:
directives from timezone data files (which are now excluded from the rdoc build). - Installation of the gem now causes rdoc API documentation to be generated. #4905.
- When optimizing transitions to generate zone definitions, check the UTC and standard offsets separately rather than just the total offset to UTC. Fixes an incorrect abbreviation issue with Europe/London, Europe/Dublin and Pacific/Auckland.
- Eliminated unnecessary
.nil?
calls to give a minor performance gain. Timezone.all
andTimezone.all_identifiers
now return all theTimezone
instances/identifiers rather than just those associated with countries. #4146.- Added
all_data_zones
,all_data_zone_identifiers
,all_linked_zones
andall_linked_zone_identifiers
class methods toTimezone
. - Added a
strftime
method toTimezone
that converts a time in UTC to local time and then returns it formatted.%Z
is replaced with the timezone abbreviation for the given time (for example, EST or EDT). #4143. - Fix escaping of quotes in
TZDataParser
. This affected country names and descriptions of time zones within countries.