diff options
-rw-r--r-- | src/components.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components.rs b/src/components.rs index 2a1307f..3f8a51e 100644 --- a/src/components.rs +++ b/src/components.rs @@ -55,7 +55,7 @@ pub trait Component { fn fmt_write<W: fmt::Write>(&self, out: &mut W) -> Result<(), fmt::Error> { writeln!(out, "BEGIN:{}", Self::component_kind())?; - let now = UTC::now().format("%Y%m%dT%H%M%SZ"); + let now = UTC::now().format("%Y%m%dT%H%M%S"); writeln!(out, "DTSTAMP:{}", now)?; writeln!(out, "UID:{}", Uuid::new_v4())?; @@ -87,7 +87,7 @@ pub trait Component { where TZ::Offset: fmt::Display { // DTSTART - self.add_property("DTSTART", dt.format("%Y%m%dT%H%M%SZ").to_string().as_ref()); + self.add_property("DTSTART", dt.format("%Y%m%dT%H%M%S").to_string().as_ref()); self } @@ -95,7 +95,8 @@ pub trait Component { fn ends<TZ:TimeZone>(&mut self, dt: DateTime<TZ>) -> &mut Self where TZ::Offset: fmt::Display { - self.add_property("DTEND", dt.format("%Y%m%dT%H%M%SZ").to_string().as_ref()); + // TODO don't manually use format but the rfc method, but test timezone behaviour + self.add_property("DTEND", dt.format("%Y%m%dT%H%M%S").to_string().as_ref()); self } |