标签: ruby time iso8601
require 'json' # => true x = { starting_time: Time.now } # => {:starting_time=>2019-04-19 11:51:30 +0900} x.to_json # => "{\"starting_time\":\"2019-04-19 11:51:30 +0900\"}"
我希望我的日期格式在iso8601中自动序列化。如何设置序列化的默认值?