use chrono::{DateTime, NaiveDateTime, Utc};
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct TimeInfo {
pub datetime_utc: Option<DateTime<Utc>>,
pub datetime_local: NaiveDateTime,
pub timezone: Option<TimeZoneInfo>,
pub source_details: SourceDetails,
}
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct TimeZoneInfo {
pub name: String,
pub offset_seconds: i32,
pub source: String,
}
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct SourceDetails {
pub time_source: String,
pub confidence: String, }
pub const CONFIDENCE_HIGH: &str = "High"; pub const CONFIDENCE_MEDIUM: &str = "Medium"; pub const CONFIDENCE_LOW: &str = "Low";