Skip to content

Commit

Permalink
fix remaining usage of DateTime<Utc>
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioFranco committed Sep 18, 2024
1 parent ccea285 commit aeb495f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions libsql-server/src/namespace/configurator/libsql_primary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ impl ConfigureNamespace for LibsqlPrimaryConfigurator {
_from_config: MetaStoreHandle,
_to_ns: NamespaceName,
_to_config: MetaStoreHandle,
_timestamp: Option<chrono::prelude::NaiveDateTime>,
timestamp: Option<chrono::prelude::NaiveDateTime>,
_store: NamespaceStore,
) -> Pin<Box<dyn Future<Output = crate::Result<Namespace>> + Send + 'a>> {
Box::pin(async move {
Expand All @@ -283,7 +283,9 @@ impl ConfigureNamespace for LibsqlPrimaryConfigurator {
.find_segment(
&s.backend().default_config(),
&ns,
libsql_wal::storage::backend::FindSegmentReq::Timestamp(ts),
libsql_wal::storage::backend::FindSegmentReq::Timestamp(
ts.and_utc(),
),
)
.await
.unwrap();
Expand Down
3 changes: 1 addition & 2 deletions libsql-server/src/namespace/configurator/replica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::pin::Pin;
use std::sync::atomic::AtomicBool;
use std::sync::Arc;

use chrono::{DateTime, Utc};
use futures::Future;
use hyper::Uri;
use libsql_replication::rpc::replication::log_offset::WalFlavor;
Expand Down Expand Up @@ -256,7 +255,7 @@ impl ConfigureNamespace for ReplicaConfigurator {
_from_config: MetaStoreHandle,
_to_ns: NamespaceName,
_to_config: MetaStoreHandle,
_timestamp: Option<DateTime<Utc>>,
_timestamp: Option<chrono::NaiveDateTime>,
_store: NamespaceStore,
) -> Pin<Box<dyn Future<Output = crate::Result<Namespace>> + Send + 'a>> {
Box::pin(std::future::ready(Err(crate::Error::Fork(
Expand Down

0 comments on commit aeb495f

Please sign in to comment.