Module: JayAPI::Elasticsearch::Time
- Included in:
- PropertiesFetcher, RSpec::TestDataCollector
- Defined in:
- lib/jay_api/elasticsearch/time.rb
Constant Summary collapse
- TIME_FORMAT =
Time format accepted by elasticsearch
'%Y/%m/%d %H:%M:%S'
Instance Method Summary collapse
-
#format_time(time) ⇒ String
Transforms a Time object to a time format that is recognized by elasticsearch.
Instance Method Details
#format_time(time) ⇒ String
Transforms a Time object to a time format that is recognized by elasticsearch
13 14 15 |
# File 'lib/jay_api/elasticsearch/time.rb', line 13 def format_time(time) time.getutc.strftime(TIME_FORMAT) end |