Module: T
- Defined in:
- lib/t.rb,
lib/t/cli.rb,
lib/t/set.rb,
lib/t/list.rb,
lib/t/utils.rb,
lib/t/delete.rb,
lib/t/editor.rb,
lib/t/rcfile.rb,
lib/t/search.rb,
lib/t/stream.rb,
lib/t/version.rb,
lib/t/printable.rb,
lib/t/collectable.rb,
lib/t/requestable.rb
Defined Under Namespace
Modules: Collectable, Printable, Requestable, Utils Classes: CLI, Delete, Editor, List, RCFile, Search, Set, Stream, Version
Class Attribute Summary collapse
-
.utc_offset ⇒ Object
UTC offset in seconds to apply time instances before displaying.
Class Method Summary collapse
-
.local_time(time) ⇒ Object
Convert time to local time by applying the ‘utc_offset` setting.
Class Attribute Details
.utc_offset ⇒ Object
UTC offset in seconds to apply time instances before displaying. If not set, time instances are displayed in default local time.
13 14 15 |
# File 'lib/t.rb', line 13 def utc_offset @utc_offset end |
Class Method Details
.local_time(time) ⇒ Object
Convert time to local time by applying the ‘utc_offset` setting.
7 8 9 |
# File 'lib/t.rb', line 7 def local_time(time) utc_offset ? (time.dup.utc + utc_offset) : time.localtime end |