Skip to content

Commit

Permalink
fix(entity): representation of an expanded date time
Browse files Browse the repository at this point in the history
  • Loading branch information
bobeal committed Feb 28, 2023
1 parent 86bc13c commit 95f2456
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,11 @@ fun geoPropertyToWKT(jsonFragment: Map<String, Any>): Map<String, Any> {
fun Map<String, Any>.addDateTimeProperty(propertyKey: String, dateTime: ZonedDateTime?): Map<String, Any> =
if (dateTime != null)
this.plus(
propertyKey to mapOf(
JSONLD_TYPE to JsonLdUtils.NGSILD_DATE_TIME_TYPE,
JSONLD_VALUE_KW to dateTime.toNgsiLdFormat()
propertyKey to listOf(
mapOf(
JSONLD_TYPE to JsonLdUtils.NGSILD_DATE_TIME_TYPE,
JSONLD_VALUE_KW to dateTime.toNgsiLdFormat()
)
)
)
else this
Expand Down

0 comments on commit 95f2456

Please sign in to comment.