aboutsummaryrefslogtreecommitdiff
path: root/src/model/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/mod.rs')
-rw-r--r--src/model/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/model/mod.rs b/src/model/mod.rs
index 26c6f42..bc414c7 100644
--- a/src/model/mod.rs
+++ b/src/model/mod.rs
@@ -40,12 +40,12 @@ pub use self::user::*;
pub use self::voice::*;
pub use self::webhook::*;
+use chrono::NaiveDateTime;
use self::utils::*;
use serde::de::Visitor;
use std::collections::HashMap;
use std::fmt::{Formatter, Result as FmtResult};
use std::sync::{Arc, RwLock};
-use time::Timespec;
use ::internal::prelude::*;
#[cfg(feature="utils")]
@@ -63,10 +63,10 @@ macro_rules! id {
impl $name {
/// Retrieves the time that the Id was created at.
- pub fn created_at(&self) -> Timespec {
+ pub fn created_at(&self) -> NaiveDateTime {
let offset = (self.0 >> 22) / 1000;
- Timespec::new(1420070400 + offset as i64, 0)
+ NaiveDateTime::from_timestamp(1420070400 + offset as i64, 0)
}
}