Open litlfred opened 3 years ago
Hi Carl
So this part of the code will just take the lastUpdated
property directly from the mCSD configuration file.
If you want to be able to more dynamically adjust the lastUpdated you can also use the --last-updated XX
parameter to the tool. This will just be sent directly into dhis2.
So yes, there could definitely be timezone considerations here, but the tools is agnostic about it.
We are at this point not planning on adding a "persisted timestamp" of when the last successful export occurred, but it is something we can look into in the future.
Not sure where you are updating the value of 'lastUpdated' - is that the time of the server running dhis2-python or the dhis2 server? Noting that in when doing this once for CSD when had two servers in different timezones and the date/time was a problem. I know you are only doing date here, but could still end up with two different dates even b/c of timezones.
https://github.com/dhis2/dhis2-python/blob/b17d7afc71748bd61bc1828f42fff2d619656fb8/dhis2_core/src/dhis2/facility_list/mcsd.py#L31