summaryrefslogtreecommitdiffstats
path: root/src/modules/time.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/time.rs')
-rw-r--r--src/modules/time.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/time.rs b/src/modules/time.rs
index d76a5c1e1..bf1857c4f 100644
--- a/src/modules/time.rs
+++ b/src/modules/time.rs
@@ -1,5 +1,4 @@
use ansi_term::Color;
-use chrono::offset::TimeZone;
use chrono::{DateTime, Local};
use super::{Context, Module};
@@ -51,6 +50,7 @@ tests become extra important */
#[cfg(test)]
mod tests {
use super::*;
+ use chrono::offset::TimeZone;
const FMT_12: &str = "%r";
const FMT_24: &str = "%T";
@@ -97,6 +97,7 @@ mod tests {
assert_eq!(formatted, "15:36:47");
}
+ #[test]
fn test_format_with_paren() {
let time = Local.ymd(2014, 7, 8).and_hms(15, 36, 47);
let formatted = format_time("[%T]", time);