Skip to content

9 digit millisecond dateformat in sync endpoint is unsupported #520

@r0ssing

Description

@r0ssing

The sync-endpoint query endpoints do not seem to work correctly?
Specifically the endpoints to return rows updated after a provided date. The endpoints seems to return rows updated before the provided date in some cases?
Endpoints in question
.../query/savepointTimestamp?startTime=
../query/lastUpdateDate?startTime=
It might, or might not, be related to the 9 digit millisecond format?

In several places in the code (in e.g. the suitcase client and sync-endpoint) a date format containing 9 digits for milliseconds is used, e.g.

SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS");

https://github.com/odk-x/sync-endpoint/blob/master/src/main/java/org/opendatakit/aggregate/odktables/DataManager.java:444

I think maybe it should be updated to only use 3 digits, as 9 is not supported and will result in a parsing error if supplied in the URL param?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions