In a national DHIS2 2.4.x implementation, we call dataValueSets API to get incremental data every hour with the following syntax -
https://***/api/dataValueSets.csv?dataSet=l8ppzBjgihH&orgUnitGroup=qRsdUL2Oa4d&lastUpdatedDuration=3h&includeDeleted=true
For some of the facilities (2%), we get this kind of results -
If you look closely to the selected row, the lastupdated value has a strange date. We tried the ‘Month-Year’ syntax of dataValueSets, lets say the JSON format -
Sometimes it happens to me as well. But when you import it to Excel, try to remove all Time part starting from T… Inside all date time field. Then apply short date format. That should fix everything
There might be some problem in the old data. Try checking if you have last updated date value available in database table for these problematic records from 2019 year?
@JoyBindroo these are data entered by staff all around the country, and we are the software dev team. we even do not have access to the DHIS2 platform other than API access. Moreover, the last update date is generated by DHIS2, not by user. And this is not one time incidence, it continuously have been happening every month.
I suspect this is a DHIS2 bug. Maybe the dev team can review?
@Mahmud the date is not necessarily generated by the server. If the date is specified as part of the data import payload, then the date (created or lastupdated) specified in the payload will be used. This can occur during import of data from CSV files or other sources like Android clients. The current date will be used if the data is entered via the data entry screen.
This ticket describes in much more detail about this behavior. If you read through the ticket, you can see that there is not complete agreement within the development team about how this should actually function, but if you have observations about this, please feel free to offer any insights.
I agree with @Ulanbek , that this is most likely the result of a corrupted timestamp which is part of a bulk import. If the timestamps are not part of the import payload, then the current server time should be used.
@jason I doubt that data is being imported every month in the server! People just enter data every month, there is no import business. As we are seeing it happening every month sporadically to different ‘parent nodes’ only and not on ‘child nodes’, so seems to me there is something else there. Anyway, we will find our own way of managing this, the ticket is of not much help.