Use local datetime on events instead of naive

This commit is contained in:
Félix Saparelli 2021-08-16 21:52:13 +12:00
parent 61fec2cf27
commit f08bdad8ee
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
//! 2. To be filtered upon according to whatever set of criteria is desired;
//! 3. To carry information about what caused the event, which may be provided to the process.
use chrono::NaiveDateTime;
use chrono::{DateTime, Local};
use std::{collections::HashMap, path::PathBuf};
/// An event, as far as watchexec cares about.
@ -18,7 +18,7 @@ pub struct Event {
#[derive(Clone, Debug, Eq, PartialEq)]
#[non_exhaustive]
pub enum Particle {
Time(NaiveDateTime),
Time(DateTime<Local>),
Path(PathBuf),
Source(Source),
Process(u32),