Community Health Toolkit

How to adjust timestamps on reports after correcting date-time on the device?

We have users who have manually changed the dates on their phones, which resulted in reported dates in their submitted docs to differ from the actual, now we want to rectify this,
I had in mind the thought to note down the time difference between the device and real time, then fix device time and after that download all their docs, and change the dates manually (via a script) and re-upload them again.

  1. Do you think this is a good idea?
  2. If It is a good idea, what is a best way of getting all CHV docs using medic-conf? I am thinking of using move-contacts but using the current catchment_area as a parent, will this work?

Just some thoughts:

Changing the dates consistently might not be as simple as it sounds.

If you have any fields with calculations that depend on the current date, like an age, or last menstrual period, or estimated birth date, those would need to be updated as well to be correct.

Additionally, you would need to add some way of filtering which docs to update. Some docs might already have correct dates, the ones added before users changed their clock. Can you know exactly when each user changed their system clock?
Even if you did, depending on the time shift, you might have docs you are uncertain were added before or after the clock change.

Once you update the docs, all affected users will need to index the newly downloaded docs and will need to be re-generate their tasks. Depending on the number of updates each user gets, this might interrupt day-to-day operations for CHWs because they can’t use their devices while view indexing is progressing (loading spinners everywhere).