Please add support for `chrono::{Date, DateTime}` and friends in addition to "time".
After wrestling a bit with clickhouse_rs to extract dates out of a CH table, I find out it is using types from the "time" crate. It would be nice to have support for the different types from the "chrono" crate as well, I find the latter much easier to use.
Have a chrono feature for example, serde already know how to deal with these.
Having
#[derive(Debug, Deserialize, Serialize, Row)]
pub struct Install {
pub id: u32,
pub site_id: u32,
pub antenna_id: u32,
pub start_at: DateTime<Utc>,
pub end_at: DateTime<Utc>,
pub comment: String,
}
would be way easier than my current
#[derive(Debug, Deserialize, Serialize, Row)]
pub struct Install {
pub id: u32,
pub site_id: u32,
pub antenna_id: u32,
#[serde(with = "clickhouse::serde::time::datetime")]
pub start_at: OffsetDateTime,
#[serde(with = "clickhouse::serde::time::datetime")]
pub end_at: OffsetDateTime,
pub comment: String,
}
Thanks.
There's also the jiff crate now as well. Would be happy to contribute support
This crate should support all three under features, so I'd like to accept PR. Anyway, I'm thinking about moving to jiff for my production code so that it will be implemented eventually anyway
Was added in #188