Open peterdesmet opened 1 year ago
Explicitly defining the format
(i.e. not relying on default
) and having milliseconds optional is not possible. format
relies on strptime, which does not have a format code for optional milliseconds (there is a feature request for it). So we have two options:
%Y-%m-%dT%H:%M:%S.%f%z
. Note that e.g. Movebank exports always have milliseconds.format = default
, which allows (in Frictionless Framework) the four formats above, even though the specs say it should forbid non UTC. It (annoyingly) also allows timestamps without timezone information.Discussed with @kbubnicki, moved to 1.1. Camtrap DP 1.0 will thus not allow milliseconds, but we keep the explicit format
that warns for missing timezone (which is likely a more common use case). We'll have to see how this evolves at Frictionless.
Some terms (especially media
timestamp
andeventStart
andeventEnd
) could benefit from expressing milliseconds. Ideally we support 4 ways of writing timestamps (all ISO):All of these seem to pass Frictionless Framework validation for
format=default
, but according to the specs,default
implies:It looks like Frictionless Framework also allows timezone offsets (i.e. more than the specs allow). @roll is this intentional?
For Camtrap DP we therefor opted to explicitly define the format:
https://github.com/tdwg/camtrap-dp/blob/22f5309f9a29d2b202d453c4c68d52d325c21e28/observations-table-schema.json#L53
That pattern will however fail for milliseconds, so we should adapt it. Or we should always require milliseconds.
Note that
%z
correctly allows-0200
,+0200
,Z
and correctly forbids empty and-0280
.