TimeWithZone should not accept unrecognized time zones
Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6573 Created by Marc-André Lafortune - 2011-03-14 14:53:36 UTC
Currently, the following doesn't raise any error:
t = Time.now.in_time_zone("There is no such timezone"); t.utc
Many other methods of TimeWithZone
will raise a NoMethodError
as soon as they try to access the timezone (e.g. t.inspect
).
It should not be possible to create a TimeWithZone with an invalid timezone.