【发布时间】:2017-10-27 13:25:06
【问题描述】:
Browsing through Ecto.DateTime,它似乎已被:naive_datetime 弃用。我想以最准确的表示形式存储时间戳,但我似乎找不到 :naive_datetime 为我提供的内容。据我所知,Ecto.DateTime 可以转换为 ISO8601,但它没有给出任何关于如何在数据库中存储幼稚日期时间的指示。
在创建时间戳时是否还有其他可能的选项可以指定:
schema "test" do
field :name
timestamps type: :iso8601 # This doesn't work
end
我无法找到其他可能选项的列表。我被天真的日期时间困住了吗?
【问题讨论】: