|
12345678910111213141516171819 |
- use structopt::StructOpt;
- use chrono::prelude::*;
-
- #[derive(StructOpt, Debug)]
- #[structopt(author = env!("CARGO_PKG_AUTHORS"))]
- struct Opt {
- /// time to convert
- #[structopt(value_name = "HH:MM")]
- time: String,
-
- /// specify the date on which the time lies. defaults to today.
- #[structopt(long, short)]
- date: Option<NaiveDate>,
- }
-
- fn main() {
- let Opt { time, date } = Opt::from_args();
- tzconvert::convert("EST", "Europe/Brussels", &time, date);
- }
|