summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2020-05-17 22:04:54 +0200
committerCanop <cano.petrole@gmail.com>2020-05-17 22:04:54 +0200
commitc34ab59be7547e2420ff83097594733d8d6c258d (patch)
tree56e4f08ce42f85d331ccccd520255219cadcd58b /src/cli.rs
parent4f9a94e0322a4bffca9eb247817320638e2dd2a0 (diff)
date/time format configured in conf.toml
Fix #229 Format follows https://docs.rs/chrono/0.4.11/chrono/format/strftime/index.html Example: date_time_format = "%Y-%m-%d %R "
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 0782fbc..acc32ff 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -164,6 +164,9 @@ pub fn run() -> Result<Option<Launchable>, ProgramError> {
tree_options.apply(&conf_matches);
}
tree_options.apply(&cli_matches);
+ if let Some(format) = &config.date_time_format {
+ tree_options.set_date_time_format(format.clone());
+ }
// verb store is completed from the config file(s)
let mut verb_store = VerbStore::new();