in crates/core/src/timeline/instant.rs [165:179]
fn parse_naive_datetime(timestamp: &str) -> Result<NaiveDateTime> {
let naive_dt = NaiveDateTime::parse_from_str(×tamp[..14], "%Y%m%d%H%M%S")
.map_err(|e| CoreError::Timeline(format!("Failed to parse timestamp: {}", e)))?;
if timestamp.len() == 17 {
let millis: u32 = timestamp[14..]
.parse()
.map_err(|e| CoreError::Timeline(format!("Failed to parse milliseconds: {}", e)))?;
naive_dt
.with_nanosecond(millis * 1_000_000)
.ok_or_else(|| CoreError::Timeline("Invalid milliseconds".to_string()))
} else {
Ok(naive_dt)
}
}