1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use busylib::types::timestamp::Timestamp;
use busylib::types::timezone_name::TimezoneName;
use clap::Subcommand;
use crate::cli::Context;
use crate::error::Result;
#[derive(Debug, Subcommand)]
pub enum TimeCommand {
/// Show the device clock
Now,
/// Set the device clock
Set {
/// ISO 8601 timestamp with time zone
#[arg(value_name = "TIMESTAMP")]
timestamp: Timestamp,
},
/// Show the time zone
Timezone,
/// Set the time zone
SetTimezone {
/// Time zone name
#[arg(value_name = "NAME")]
name: TimezoneName,
},
/// List the supported time zones
Timezones,
}
impl TimeCommand {
pub async fn run(self, _context: &Context) -> Result<()> {
todo!()
}
}