Skip to content

Fix verify collection date

Renato Sampaio requested to merge fix_verify_collection_date into development

Fixes datetime comparison that was using a broken logic with the absolute value between seconds. Datetime diff only returns positive integers. In this case if date1 < date2 there will be a 24 hour difference (86400 seconds).

Example: collected_date = 2020-01-21 22:16:31 real_date = 2020-01-21 22:16:05.762279 diff = real_date - collected_date = 86374 seconds abs(diff) = 86374

diff2 = collected_date - real_date = 26 seconds

Merge request reports