You've already forked parse_datetime
mirror of
https://github.com/uutils/parse_datetime.git
synced 2026-06-10 16:13:15 -07:00
Replace use of NativeDateTime::from_timestamp_opt
with DateTime::from_timestamp due to deprecation
This commit is contained in:
+2
-2
@@ -199,8 +199,8 @@ pub fn parse_datetime_at_date<S: AsRef<str> + Clone>(
|
||||
|
||||
// Parse epoch seconds
|
||||
if let Ok(timestamp) = parse_timestamp(s.as_ref()) {
|
||||
if let Some(timestamp_date) = NaiveDateTime::from_timestamp_opt(timestamp, 0) {
|
||||
return Ok(date.offset().from_utc_datetime(×tamp_date));
|
||||
if let Some(timestamp_date) = DateTime::from_timestamp(timestamp, 0) {
|
||||
return Ok(timestamp_date.into());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user