@@ -5,12 +5,12 @@ extern crate regex;
55mod date_string_parser;
66
77use clap:: ArgMatches ;
8- use chrono:: { Date , TimeZone , Utc } ;
8+ use chrono:: { Date , TimeZone , Local } ;
99use DateFormat ;
1010
1111pub struct Inputs {
12- pub start : Option < Date < Utc > > ,
13- pub end : Option < Date < Utc > > ,
12+ pub start : Option < Date < Local > > ,
13+ pub end : Option < Date < Local > > ,
1414 pub offset : Option < i64 > ,
1515 pub format_type : DateFormat ,
1616 pub list_output : bool ,
@@ -21,19 +21,19 @@ impl Inputs {
2121 pub fn new ( args : ArgMatches ) -> Result < Inputs , & ' static str > {
2222 let mut input_format_type = DateFormat :: Dashes ;
2323
24- let mut start: Option < Date < Utc > > = match args. value_of ( "start" ) {
24+ let mut start: Option < Date < Local > > = match args. value_of ( "start" ) {
2525 Some ( value) => {
2626 let parsed_value = date_string_parser:: ParsedDateString :: new ( value) ?;
2727 input_format_type = parsed_value. format_type ;
28- Some ( Utc . ymd ( parsed_value. year , parsed_value. month , parsed_value. day ) )
28+ Some ( Local . ymd ( parsed_value. year , parsed_value. month , parsed_value. day ) )
2929 }
3030 None => None ,
3131 } ;
3232
33- let mut end: Option < Date < Utc > > = match args. value_of ( "end" ) {
33+ let mut end: Option < Date < Local > > = match args. value_of ( "end" ) {
3434 Some ( value) => {
3535 let parsed_value = date_string_parser:: ParsedDateString :: new ( value) ?;
36- Some ( Utc . ymd ( parsed_value. year , parsed_value. month , parsed_value. day ) )
36+ Some ( Local . ymd ( parsed_value. year , parsed_value. month , parsed_value. day ) )
3737 }
3838 None => None ,
3939 } ;
@@ -52,7 +52,7 @@ impl Inputs {
5252 } ;
5353
5454 let today = if args. is_present ( "today" ) {
55- Some ( Utc :: today ( ) )
55+ Some ( Local :: today ( ) )
5656 } else {
5757 None
5858 } ;
0 commit comments