【发布时间】:2019-06-30 16:23:53
【问题描述】:
我尝试过类似的方法:
a = ActiveSupport::TimeWithZone.new(Time.now,Time.zone)
b = a
a - b # it gives 0.0 (float)
当我尝试时:
a.to_s # it gives "2019-06-30 11:11:42 -0700"
a.to_a # it gives [42, 11, 11, 30, 6, 2019, 0, 181, true, "PDT"]
那么这个浮点数是从哪里来的?
【问题讨论】:
标签: ruby-on-rails activesupport