-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
I'd like to propose allowing more flexibility for decimal seconds on the DateTime type, allowing it to accept or output between 0-6 digits after the decimal point, i.e. down to microsecond precision. Here is my rationale:
- Different systems and languages by default support different numbers of decimal seconds: OrientDB by default supports only integer seconds (i.e. 0 decimal places), and others like Python support up to 6 decimal places (microseconds).
- If we prescribe a single, fixed number of decimal places and mandate it for all use cases, no matter what number we pick, we will always make someone unhappy about their use case being unsupported. This may lead to a proliferation of competing
DateTimestandards, and that's something we would probably all prefer to avoid. - Parsing and rounding rules for additional decimal places are reasonably straightforward to implement, and would not add too much complexity to the spec. If a system expects more precision than is provided, we effectively pad the input with zeroes without changing the semantics. If a system is provided more precision than it supports, it can round to the nearest value it supports, which is guaranteed to be no more than half a second away from the input.
SeijiSuenaga
Metadata
Metadata
Assignees
Labels
No labels