-
Couldn't load subscription status.
- Fork 31
Description
Is your feature request related to a problem? Please describe.
Since we added support for 6-millisecond precision in datetime, the datetime filter should either support 6 digits or at least round the last 3 milliseconds (at the moment the datetime filter supports 3 digits).
Currently, the filter takes the following input:
2023-01-23T08:32:41.024699Z
and truncates it to be used in the filter func as:
2023-01-23T08:32:41.024Z
From my understanding, .024699Z ≠ .024Z, and .024699Z should be rounded to .025Z.
Describe the solution you'd like
Supporting 6 digits in the filter would require changing the model schema to use datetime with nanosecond precision, which we don’t need, as it would make the expiry date as year 2264. The simplest solution would be to add rounding in the normalization function. I propose using banker’s rounding, where 1–5 rounds to 0 and 6–9 rounds to 1.
Let me know your thoughts on potentially adding this feature.