Skip to content

Commit 9b4ea11

Browse files
authored
Fix: MappedLocalTime should not be exposed (#529)
1 parent ded5926 commit 9b4ea11

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/iceberg/src/spec/view_metadata.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ use std::fmt::{Display, Formatter};
2424
use std::sync::Arc;
2525

2626
use _serde::ViewMetadataEnum;
27-
use chrono::{DateTime, MappedLocalTime, TimeZone, Utc};
27+
use chrono::{DateTime, Utc};
2828
use serde::{Deserialize, Serialize};
2929
use serde_repr::{Deserialize_repr, Serialize_repr};
3030
use uuid::Uuid;
3131

3232
use super::view_version::{ViewVersion, ViewVersionId, ViewVersionRef};
3333
use super::{SchemaId, SchemaRef};
3434
use crate::catalog::ViewCreation;
35-
use crate::error::Result;
35+
use crate::error::{timestamp_ms_to_utc, Result};
3636

3737
/// Reference to [`ViewMetadata`].
3838
pub type ViewMetadataRef = Arc<ViewMetadata>;
@@ -238,8 +238,8 @@ impl ViewVersionLog {
238238
}
239239

240240
/// Returns the last updated timestamp as a DateTime<Utc> with millisecond precision.
241-
pub fn timestamp(self) -> MappedLocalTime<DateTime<Utc>> {
242-
Utc.timestamp_millis_opt(self.timestamp_ms)
241+
pub fn timestamp(self) -> Result<DateTime<Utc>> {
242+
timestamp_ms_to_utc(self.timestamp_ms)
243243
}
244244
}
245245

0 commit comments

Comments
 (0)