- 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 %>