FraunhoferIOSB / FROST-Python-Client

Python Client Library for FROST.
GNU Lesser General Public License v3.0
8 stars 8 forks source link

Observtion.__eq__ depends on identical encoding for time properties #31

Open securedimensions opened 5 months ago

securedimensions commented 5 months ago

Is this a bug?

Comparing observations with the same phenomenonTime but encoded differently results in not equals

Reproducing the error

import frost_sta_client as fsc

o1 = fsc.Observation(phenomenon_time='2024-04-17T12:00:00Z', ...)
o2 = fsc.Observation(phenomenon_time='2024-04-17T12:00:00.000+00:00', ...)

if o1 != o2:
    print("observations are not equal")
else:
    print("observations are equal")