istSOS / istSOS4

Other
1 stars 0 forks source link

Datastream phenomenonTime field not updated on new observation insert #10

Closed danistrigaro closed 1 week ago

danistrigaro commented 1 week ago

if I insert a new observation with a POST request and a body like: {'resultTime': '2024-09-23T12:00:00+01:00', 'phenomenonTime': '2024-09-23T12:00:00+01:00', 'result': '48.0', 'resultQuality': 100, 'Datastream': {'@iot.id': 8}}

The phenomenonTime field of the Datastream is not updated. The issue could be caused by the addition of the time zone '+01:00'. In fact if an observation is inserted without the time zone everything is working correctly.

ClaudioPrimerano commented 1 week ago

The issue is not related to the timezone.

The phenomenonTime field of the Datastream was being updated with an empty value when a new Observation was inserted, in cases where the start time and end time were the same. To resolve this, it's enough to update this range as a closed range.

commit details