The following code
class Schedule < ActiveRecord::Base
def self.get
today = TZInfo::Timezone.get('America/New_York').utc_to_local(Time.now.utc).to_date
end
end
produces the following error:
uninitialized constant Schedule::TZInfo
but only when I'm not running it from script/console. Thoughts?
(Also, is there a better way to get the current date in a given time zone?)