Releases: tzinfo/tzinfo
Releases · tzinfo/tzinfo
v0.1.0
period_for_local
andlocal_to_utc
now allow resolution of ambiguous times (e.g. when switching from daylight savings to standard time). The behaviour of these methods when faced with an ambiguous local time has now changed. If you are using these methods you should check the documentation. Thanks to Cliff Matthews for suggesting this change.- Added
require 'date'
totimezone.rb
(date isn't loaded by default in all environments). - Use rake to build packages and documentation.
- License file is now included in gem distribution.
- Dates in definitions stored as Astronomical Julian Day numbers rather than as civil dates (improves performance creating
DateTime
instances). - Added options to
TZDataParser
to allow generation of specific zones and countries. - Moved
TimezonePeriod
class totimezone_period.rb
. - New
TimezonePeriodList
class to storeTimezonePeriod
instances for a timezone and perform searches for periods. - Time zones are now defined using blocks.
TimezonePeriod
instances are only instantiated when they are needed. Thanks to Jamis Buck for the suggestion. - Add options to
TZDataParser
to allow exclusion of specific zones and countries. - Exclude the Riyadh Solar Time zones. The rules are only for 1987 to 1989 and take a long time to generate and process. Riyadh Solar Time is no longer observed.
- The last
TimezonePeriod
for eachTimezone
is now written out with an unbounded rather than arbitrary end time. - Construct the
Rational
offset inTimezonePeriod
once when theTimezonePeriod
is constructed rather than each time it is needed. Timezone
andCountry
now keep a cache of loaded instances to avoid runningrequire
which can be slow on some platforms.- Updated to tzdata version 2005n.
v0.0.4
- Removed debug output accidentally included in the previous release.
- Fixed a bug in the generation of friendly zone identifiers (was inserting apostrophes into UTC, GMT, etc).
- Fixed
Country
<=>
operator (was comparing non-existent attribute) - Fixed
Timezone.period_for_local
error when period not found. - Added test cases for
Timezone
,TimezoneProxy
,TimezonePeriod
,Country
and some selected time zones.
v0.0.3
- Reduced visibility of some methods added in
Timezone#setup
andCountry#setup
. - Added
name
method toTimezone
(returns the identifier). - Added
friendly_identifier
method toTimezone
. Returns a more friendly version of the identifier. - Added
to_s
method toTimezone
. Returns the friendly identifier. - Added
==
and<=>
operators toTimezone
(compares identifiers). Timezone
now includesComparable
.- Added
to_s
method toCountry
. - Added
==
and<=>
operators toCountry
(compares ISO 3166 country codes). Country
now includesComparable
.- New
TimezoneProxy
class that behaves the same as aTimezone
but doesn't actually load in its definition until it is actually required. - Modified
Timezone
andCountry
methods that returnTimezone
instances to returnTimezoneProxy
instances instead. This makes these methods much quicker.
In Ruby on Rails, you can now show a drop-down list of all time zones using the Rails time_zone_select
helper method:
<%= time_zone_select 'user', 'time_zone', TZInfo::Timezone.all.sort, :model => TZInfo::Timezone %>
v0.0.2
Country
andTimezone
data is now loaded into class rather than instance variables. This makesTimezone
links more efficient and saves memory if creating specificTimezone
andCountry
classes directly.TimezonePeriod
zone_identifier
is now defined as a symbol to save memory (was previously a string).TimezonePeriod
zone_identifiers
that were previously''
are now:Unknown
.Timezone
andCountry
instances can now be returned usingTimezone.new(identifier)
andCountry.new(identifier)
. When passed an identifier, thenew
method callsget
to return an instance of the specified timezone or country.- Added new class methods to
Timezone
to return sets of zones and identifiers.
Thanks to Scott Barron of Lunchbox Software for the suggestions in his article about using TZInfo with Rails (https://web.archive.org/web/20060425190845/http://lunchroom.lunchboxsoftware.com/pages/tzinfo_rails)
v0.0.1
- First release.