YUKI Hiroshi
null+****@clear*****
Thu Sep 12 12:15:47 JST 2013
YUKI Hiroshi 2013-09-12 12:15:47 +0900 (Thu, 12 Sep 2013) New Revision: 5090c2a8b0cdab5741827a75b0426f7195996322 https://github.com/droonga/fluent-plugin-droonga/commit/5090c2a8b0cdab5741827a75b0426f7195996322 Message: Use extended method of Time class, instead of DateTime class Modified files: lib/groonga_command_converter.rb Modified: lib/groonga_command_converter.rb (+4 -4) =================================================================== --- lib/groonga_command_converter.rb 2013-09-12 11:59:43 +0900 (27b3609) +++ lib/groonga_command_converter.rb 2013-09-12 12:15:47 +0900 (7c9b918) @@ -17,7 +17,7 @@ require "groonga/command" require "digest/sha1" -require "date" +require "time" module Droonga class GroongaCommandConverter @@ -54,7 +54,7 @@ module Droonga { :id => id, - :date => @options[:date] || current_date, + :date => formatted_date(@options[:date]), :replyTo => @options[:reply_to], :statusCode => @options[:status_code] || STATUS_OK, :dataset => @options[:dataset], @@ -70,8 +70,8 @@ module Droonga Digest::SHA1.hexdigest("#{now_msec}:#{random_string}") end - def current_date - DateTime.now.to_s + def formatted_date(time=Time.now) + time.iso8601 end def create_table_create_command -------------- next part -------------- HTML����������������������������...Download