-
Notifications
You must be signed in to change notification settings - Fork 19
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
metadata parser wrongly adds current date to temporal metadata #1151
Comments
>>> from dateutil.parser import parse
>>> parse('2012')
datetime.datetime(2012, 1, 17, 0, 0)
@jh-RLI , @Ludee: proposed solution: i don't see why omi has to parse a date/datetime string from json into a datetime object. all we want is to make sure that it is a valid date/time/datetime string that CAN be parsed if needed. so i suggest to check if the value is
but not actually convert it into a datetime object (because why?) |
additionally: even if the value is a proper datetime string, the "validated" result is truncated! ( |
If I understand correctly, it seems very strange that a python datuitls library with 2k stars produces this kind of strange results. But this string worked for me with the new version of metadata and omi dialect. As far as I remember, at least it was not truncated and matched the original - I will check again. There is also a missing test for this case. Anyway, are you sure we don't need to worry about the datetime string format? I think some external software tools may rely on this format. |
|
steps to reproduce: create a table and upload metadata with temporal values that only contain the year:
the resulting metadata on the platform looks like this:
2021-01-17T00
is wrong here, the current date (01-17) was addedThe text was updated successfully, but these errors were encountered: