diff --git a/src/netex_france/calendars.rs b/src/netex_france/calendars.rs index bbaa07fcf..3a0f0d00c 100644 --- a/src/netex_france/calendars.rs +++ b/src/netex_france/calendars.rs @@ -106,7 +106,8 @@ impl<'a> CalendarExporter<'a> { fn generate_from_date(date: Date) -> Element { let date_string = - DateTime::::from_utc(date.and_hms_opt(0, 0, 0).unwrap(), Utc).to_rfc3339(); + DateTime::::from_naive_utc_and_offset(date.and_hms_opt(0, 0, 0).unwrap(), Utc) + .to_rfc3339(); Element::builder("FromDate") .append(Node::Text(date_string)) .build() diff --git a/src/netex_france/exporter.rs b/src/netex_france/exporter.rs index 58e3c5965..8bb70fbea 100644 --- a/src/netex_france/exporter.rs +++ b/src/netex_france/exporter.rs @@ -374,8 +374,11 @@ impl Exporter<'_> { fn create_valid_between(&self) -> Result { let format_date = |date: Date, hour, minute, second| -> String { - DateTime::::from_utc(date.and_hms_opt(hour, minute, second).unwrap(), Utc) - .to_rfc3339() + DateTime::::from_naive_utc_and_offset( + date.and_hms_opt(hour, minute, second).unwrap(), + Utc, + ) + .to_rfc3339() }; let (start_date, end_date) = self.model.calculate_validity_period()?; let from_date = Element::builder("FromDate") diff --git a/src/ntfs/read.rs b/src/ntfs/read.rs index e78741906..fbcadb711 100644 --- a/src/ntfs/read.rs +++ b/src/ntfs/read.rs @@ -438,7 +438,6 @@ where "comment.txt: comment_id={} not found", comment_link.comment_id ); - } else { } collection .index_mut(idx)