From 46c251655db7bb3d9aa814b1a5dde85336b0b9b1 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 20 Jan 2024 00:50:20 +0100 Subject: replace sled with redb --- import/src/infojson.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'import/src/infojson.rs') diff --git a/import/src/infojson.rs b/import/src/infojson.rs index c18c19d..e6b001f 100644 --- a/import/src/infojson.rs +++ b/import/src/infojson.rs @@ -5,7 +5,7 @@ */ use anyhow::Context; -use jellycommon::chrono::{format::Parsed, DateTime, Utc}; +use jellycommon::chrono::{format::Parsed, Utc}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; @@ -123,7 +123,7 @@ pub struct YHeatmapSample { pub value: f64, } -pub fn parse_upload_date(d: &str) -> anyhow::Result> { +pub fn parse_upload_date(d: &str) -> anyhow::Result { let (year, month, day) = (&d[0..4], &d[4..6], &d[6..8]); let (year, month, day) = ( year.parse().context("parsing year")?, @@ -139,5 +139,5 @@ pub fn parse_upload_date(d: &str) -> anyhow::Result> { p.hour_mod_12 = Some(0); p.minute = Some(0); p.second = Some(0); - Ok(p.to_datetime_with_timezone(&Utc)?) + Ok(p.to_datetime_with_timezone(&Utc)?.timestamp_millis()) } -- cgit v1.2.3-70-g09d2