diff --git a/src/Model/LateralContribution/LateralContribution.py b/src/Model/LateralContribution/LateralContribution.py index 6ea873203b884642e3d5092fdec4e40585566259..808479e02ffca2f38ff4eaaad005378490e987c8 100644 --- a/src/Model/LateralContribution/LateralContribution.py +++ b/src/Model/LateralContribution/LateralContribution.py @@ -18,7 +18,12 @@ import logging -from tools import trace, timer, old_pamhyr_date_to_timestamp +from tools import ( + trace, timer, + old_pamhyr_date_to_timestamp, + date_iso_to_timestamp, + date_dmy_to_timestamp, +) from Model.Tools.PamhyrDB import SQLSubModel from Model.Except import NotImplementedMethodeError @@ -189,6 +194,10 @@ class LateralContribution(SQLSubModel): @classmethod def time_convert(cls, data): if type(data) is str: + if data.count("-") == 2: + return date_iso_to_timestamp(data) + if data.count("/") == 2: + return date_dmy_to_timestamp(data) if data.count(":") == 3: return old_pamhyr_date_to_timestamp(data) if data.count(":") == 2: