Skip to content

Commit cdd1520

Browse files
committed
Fix temporal extent serialization
1 parent a77c987 commit cdd1520

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ogcapi-types/src/common/extent.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use chrono::{DateTime, Utc};
1+
use chrono::{DateTime, SecondsFormat, Utc};
22
use serde::{Deserialize, Serialize, ser::SerializeSeq, ser::Serializer};
33
use serde_with::DisplayFromStr;
44

@@ -69,7 +69,10 @@ where
6969
for inner_vec in interval {
7070
let serialized_inner_vec: Vec<_> = inner_vec
7171
.iter()
72-
.map(|item| item.as_ref().map(|dt| dt.to_rfc3339()))
72+
.map(|item| {
73+
item.as_ref()
74+
.map(|dt| dt.to_rfc3339_opts(SecondsFormat::Secs, true))
75+
})
7376
.collect();
7477

7578
outer_seq.serialize_element(&serialized_inner_vec)?;

0 commit comments

Comments
 (0)