diff --git a/Cargo.toml b/Cargo.toml index 98edcd5..62f65b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" serde = { version = "1.0.218", features = ["derive"] } serde_json = { version = "1.0.139" } rand = { version = "0.9" } -time = { version = "0.3.41", features = ["macros", "serde"] } +time = { version = "0.3.41", features = ["formatting", "macros", "parsing", "serde"] } uuid = { version = "1.16.0", features = ["v4", "serde"] } [dev-dependencies] tempfile = { version = "3.19.1" } diff --git a/src/user.rs b/src/user.rs index 2b5cb22..5095618 100644 --- a/src/user.rs +++ b/src/user.rs @@ -21,9 +21,11 @@ pub struct User { #[serde(skip_serializing_if = "String::is_empty")] pub lastname: String, pub email_verified: bool, + #[serde(with = "time::serde::rfc3339::option")] pub date_created: Option, #[serde(skip_serializing_if = "String::is_empty")] pub status: String, + #[serde(with = "time::serde::rfc3339::option")] pub last_login: Option, #[serde(skip_serializing_if = "init::is_uuid_nil")] pub salt_id: uuid::Uuid,