diff options
author | Nora <nora.widdecke@tu-bs.de> | 2019-01-20 00:32:20 +0100 |
---|---|---|
committer | Nora <nora.widdecke@tu-bs.de> | 2019-01-20 00:32:20 +0100 |
commit | 1afdd3ce0d929a7ba401363c8e6be518554446de (patch) | |
tree | 89c2ccd73acea3f49c99fda19c562d44c488d11b /src/icalwrap | |
parent | c087042652de092159d56382a8342db1cd73f0bd (diff) |
icaltime: add From for &DateTime<Local>
Diffstat (limited to 'src/icalwrap')
-rw-r--r-- | src/icalwrap/icaltime.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/icalwrap/icaltime.rs b/src/icalwrap/icaltime.rs index 243fe46..7509cd8 100644 --- a/src/icalwrap/icaltime.rs +++ b/src/icalwrap/icaltime.rs @@ -25,6 +25,12 @@ impl Deref for IcalTime { } } +impl From<&DateTime<Local>> for IcalTime { + fn from(time: &DateTime<Local>) -> IcalTime { + time.into() + } +} + impl From<DateTime<Local>> for IcalTime { fn from(time: DateTime<Local>) -> IcalTime { let timestamp = time.timestamp(); |