get rid of chrono in favor of time

This commit is contained in:
Irevoire
2022-02-15 11:41:55 +01:00
parent ea15ad6c34
commit 48542ac8fd
6 changed files with 30 additions and 21 deletions

View File

@@ -1,13 +1,13 @@
use std::collections::btree_map::Entry;
use std::collections::HashMap;
use chrono::Utc;
use fst::IntoStreamer;
use heed::types::ByteSlice;
use heed::{BytesDecode, BytesEncode};
use roaring::RoaringBitmap;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use time::OffsetDateTime;
use super::ClearDocuments;
use crate::error::{InternalError, SerializationError, UserError};
@@ -61,7 +61,7 @@ impl<'t, 'u, 'i> DeleteDocuments<'t, 'u, 'i> {
}
pub fn execute(self) -> Result<DocumentDeletionResult> {
self.index.set_updated_at(self.wtxn, &Utc::now())?;
self.index.set_updated_at(self.wtxn, &OffsetDateTime::now_utc())?;
// We retrieve the current documents ids that are in the database.
let mut documents_ids = self.index.documents_ids(self.wtxn)?;
let current_documents_ids_len = documents_ids.len();