Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
TZInfo::Timezone.get('America/New_York').utc_to_local(nil) = -18000 #39
I would expect:
Because the time difference of nothing is nothing.
Used in code, it goes like:
which consequently requires a
Sorry for the delay in responding to this.
I've decided to make TZInfo raise an exception when passed a
As for keeping the code elegant, you could add a method to the
class Time def to_new_york TZInfo::Timezone.get('America/New_York').utc_to_local(self) end end object.updated_at&.to_new_york