Browse Source

fix bug where Utc::today() was tomorrow in local tz, use now() instead

master
Jonathan Strong 10 months ago
parent
commit
253972b260
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/lib.rs

+ 1
- 1
src/lib.rs View File

@@ -69,7 +69,7 @@ pub fn convert(from: &str, to: &str, time: &str, day: Option<String>, date: Opti

let dt: Date<Tz> = match date {
Some(dt) => fromtz.from_local_date(&dt).unwrap(),
None => Utc::today().with_timezone(&fromtz),
None => Utc::now().with_timezone(&fromtz).date(),
};

let dt = match day {


Loading…
Cancel
Save