Module: Taskwarrior::Calendar::Timezone
- Included in:
- Taskwarrior::Calendar
- Defined in:
- lib/taskwarrior/calendar/timezone.rb
Instance Method Summary collapse
Instance Method Details
#tz_info ⇒ Object
16 17 18 |
# File 'lib/taskwarrior/calendar/timezone.rb', line 16 def tz_info @tz_info ||= TZInfo::Timezone.get(tz_name) end |
#tz_name ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/taskwarrior/calendar/timezone.rb', line 8 def tz_name @tz_name ||= ENV['TZ'] || begin File.read('/etc/timezone').strip rescue Errno::ENOENT 'UTC' end end |