You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support milliseconds with ISO8601DurationSerializer #1231
Use case - EdgeDB outputs ISO 8601 duration values with decimal values for millisecond precision (and doesn't currently have a DSL function to convert to milliseconds since epoch). I can address with them or write something custom but I figure an update to the bundled serializer would be the best solution :)
Changing a serializer is a breaking change so it would have to be optional; I suggest you start with something custom and we can later add it here if there is more interest. Thanks :)
@dave26199 Oki will do. I was gonna ask how this would be breaking ‘cause de/serialization of existing values would function exactly as before, but I think I get it…consumers might be implicitly casting to seconds and relying on systems that assume that exact fidelity without decimals/commas. But if so, it seems those systems function in spite of ISO spec…which exists to minimize these compatibility issues. A strange loop 👀.
Either way I seem to be the only one who has bumped into this so happy to chip away at it and submit a PR so it’s here if more come along :)
It's more the serialization side I was worried about, writing a different string can definitely be breaking :) but different deserialization is also a behavior change even if it seems more correct.
Activity
dave26199 commentedon Apr 15, 2023
Changing a serializer is a breaking change so it would have to be optional; I suggest you start with something custom and we can later add it here if there is more interest. Thanks :)
solwey-wes commentedon Apr 15, 2023
@dave26199 Oki will do. I was gonna ask how this would be breaking ‘cause de/serialization of existing values would function exactly as before, but I think I get it…consumers might be implicitly casting to seconds and relying on systems that assume that exact fidelity without decimals/commas. But if so, it seems those systems function in spite of ISO spec…which exists to minimize these compatibility issues. A strange loop 👀.
Either way I seem to be the only one who has bumped into this so happy to chip away at it and submit a PR so it’s here if more come along :)
dave26199 commentedon Apr 16, 2023
It's more the serialization side I was worried about, writing a different string can definitely be breaking :) but different deserialization is also a behavior change even if it seems more correct.
Sounds good, thanks.