aboutsummaryrefslogtreecommitdiff
path: root/karlc/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'karlc/src/main.rs')
-rw-r--r--karlc/src/main.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/karlc/src/main.rs b/karlc/src/main.rs
index 6ea540a..f4a4736 100644
--- a/karlc/src/main.rs
+++ b/karlc/src/main.rs
@@ -15,7 +15,7 @@ use std::{os::unix::net::UnixStream, path::PathBuf, process::exit};
#[clap(about, author, version)]
struct Arguments {
/// Custom path to the daemon socket
- #[clap(long)]
+ #[arg(long)]
socket_path: Option<PathBuf>,
#[clap(subcommand)]
action: Action,
@@ -115,8 +115,8 @@ fn main() {
scheduled
.map(|r| format!(
"{} - {}",
- NaiveDateTime::from_timestamp(r.start, 0),
- NaiveDateTime::from_timestamp(r.end, 0)
+ NaiveDateTime::from_timestamp_opt(r.start, 0).unwrap(),
+ NaiveDateTime::from_timestamp_opt(r.end, 0).unwrap()
))
.unwrap_or("...".to_string())
);
@@ -124,8 +124,8 @@ fn main() {
Schedule::Static(t) => {
println!(
"from {} to {}",
- NaiveDateTime::from_timestamp(t.start, 0),
- NaiveDateTime::from_timestamp(t.end, 0)
+ NaiveDateTime::from_timestamp_opt(t.start, 0).unwrap(),
+ NaiveDateTime::from_timestamp_opt(t.end, 0).unwrap()
)
}
Schedule::Condition(o) => {
@@ -146,13 +146,13 @@ fn main() {
i.start
.map(|e| format!(
"{}",
- NaiveDateTime::from_timestamp(e, 0)
+ NaiveDateTime::from_timestamp_opt(e, 0).unwrap()
))
.unwrap_or("...".to_string()),
i.end
.map(|e| format!(
"{}",
- NaiveDateTime::from_timestamp(e, 0)
+ NaiveDateTime::from_timestamp_opt(e, 0).unwrap()
))
.unwrap_or("...".to_string()),
);