summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNora <nora.widdecke@tu-bs.de>2019-04-26 18:38:49 +0200
committerNora <nora.widdecke@tu-bs.de>2019-04-26 18:38:49 +0200
commitd62653af823f01bdb44a333191430b452b226914 (patch)
tree898e9a0c71df5d5e12c23ccf7b5cfd0c5711489a
parenteef4d617e5719f6fe80d83ee26fc22a09c82a8df (diff)
actions/new: remove timezone from parsed times
-rw-r--r--src/actions/new.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/actions/new.rs b/src/actions/new.rs
index 4f95b84..f49f478 100644
--- a/src/actions/new.rs
+++ b/src/actions/new.rs
@@ -55,8 +55,7 @@ impl EventProperties {
Err("no start date/time given")?
};
let time = arg.parse::<IcalTime>()?;
- let timezone = IcalTimeZone::local();
- Ok(time.with_timezone(&timezone))
+ Ok(time)
}
fn parse_to(arg: &str) -> KhResult<IcalTime> {
@@ -64,8 +63,7 @@ impl EventProperties {
Err("no end date/time given")?
};
let time = arg.parse::<IcalTime>()?;
- let timezone = IcalTimeZone::local();
- Ok(time.with_timezone(&timezone))
+ Ok(time)
}
fn parse_location(arg: &str) -> KhResult<String> {
@@ -200,7 +198,6 @@ mod integration {
let from = EventProperties::parse_from("2017-07-14T17:45:00").unwrap();
let expected = IcalTime::floating_ymd(2017, 7, 14).and_hms(17, 45, 0);
assert_eq!(expected, from);
- assert_eq!("Europe/Berlin", from.get_timezone().unwrap().get_name());
}
#[test]