我正在使用Diesel和chrono.在我的模型中,我有一个NaiveDateTime包含类型的字段now().但是,NaiveDateTime没有功能now()或类似功能,DateTime而是:
Utc::now()
Run Code Online (Sandbox Code Playgroud)
我该如何转换Utc::now()成NaiveDateTime?
我正在使用chrono。我还有now()一些其他的NaiveDateTime。我怎样才能找到它们之间的区别?
let now = Utc::now().naive_utc();
let dt1 = get_my_naive_datetime();
Run Code Online (Sandbox Code Playgroud)