From a963f0caa75afc14b17cee2ebb556cad6508753b Mon Sep 17 00:00:00 2001 From: Mauro D Date: Thu, 19 May 2022 14:56:26 +0000 Subject: [PATCH] DateTime into i64. --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 07077d8..6cda257 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1532,3 +1532,9 @@ impl<'x, 'de> Deserialize<'de> for MessageAttachment<'x> { panic!("Deserializing message attachments is not supported at this time.") } } + +impl From for i64 { + fn from(value: DateTime) -> Self { + value.to_timestamp() + } +}