We want to allow clients to create and update documents with precise
creation and modification dates (up to the milliseconds).
However, the current way to send those dates, via the Date header
does not give us this precision as it is formatted without
milliseconds.
The Cozy stack accepts CreatedAt and UpdatedAt query-string
parameters to set those attributes during a file or directory creation
and accepts UpdatedAt during updates. Those parameters are expected
to follow RFC 3339 (see rfc-editor.org/rfc/rfc3339.txt)
which gives us the opportunity to pass fractions of a second thus
milliseconds.
For retrocompatibility, we leave the option to pass the
lastModifiedDate argument to cozy-client-js functions but clients
will be able to pass created_at and updated_at arguments to be
passed via the query-string parameters.
We want to allow clients to create and update documents with precise creation and modification dates (up to the milliseconds). However, the current way to send those dates, via the
Date
header does not give us this precision as it is formatted without milliseconds.The Cozy stack accepts
CreatedAt
andUpdatedAt
query-string parameters to set those attributes during a file or directory creation and acceptsUpdatedAt
during updates. Those parameters are expected to follow RFC 3339 (see rfc-editor.org/rfc/rfc3339.txt) which gives us the opportunity to pass fractions of a second thus milliseconds.For retrocompatibility, we leave the option to pass the
lastModifiedDate
argument tocozy-client-js
functions but clients will be able to passcreated_at
andupdated_at
arguments to be passed via the query-string parameters.