Improve time types
This commit is contained in:
parent
0f3c031b7a
commit
b7da62536d
@ -68,9 +68,9 @@ impl Project {
|
|||||||
workspace_id: Set(self.workspace_id as i64),
|
workspace_id: Set(self.workspace_id as i64),
|
||||||
raw_json: Set(serde_json::to_value(self).unwrap()),
|
raw_json: Set(serde_json::to_value(self).unwrap()),
|
||||||
color: Set(self.color.clone()),
|
color: Set(self.color.clone()),
|
||||||
server_created_at: Set(chrono::DateTime::parse_from_rfc3339(&self.created_at).unwrap()),
|
server_created_at: Set(self.created_at.clone().fixed_offset()),
|
||||||
server_updated_at: Set(chrono::DateTime::parse_from_rfc3339(&self.at).unwrap()),
|
server_updated_at: Set(self.at.clone().fixed_offset()),
|
||||||
server_deleted_at: Set(self.server_deleted_at.map(|dt| chrono::DateTime::parse_from_rfc3339(&dt).unwrap())),
|
server_deleted_at: Set(self.server_deleted_at.clone().fixed_offset()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -62,9 +62,9 @@ pub struct Project {
|
|||||||
pub name: String,
|
pub name: String,
|
||||||
pub active: bool,
|
pub active: bool,
|
||||||
pub color: String,
|
pub color: String,
|
||||||
pub at: String,
|
pub at: DateTime<Utc>,
|
||||||
pub server_deleted_at: Option<String>,
|
pub server_deleted_at: Option<DateTime<Utc>>,
|
||||||
pub created_at: String,
|
pub created_at: DateTime<Utc>,
|
||||||
|
|
||||||
// cid: Option<serde_json::Value>,
|
// cid: Option<serde_json::Value>,
|
||||||
// wid: i64,
|
// wid: i64,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user