Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
securedimensions opened this issue Apr 22, 2024 · 1 comment

Comments

@securedimensions
Copy link

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")
@reraroru
Copy link
Contributor

reraroru commented Dec 5, 2024

Indeed. Time values are currently stored as Strings. They should be converted using an appropriate datetime class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants