shrub/pkg/arvo/tests/sys/zuse
J ef1b125c3e zuse: fix time fix regression
Fixes #4598.

#4474 made the JSON time conversion no longer invertible, which caused
problems for chat, which uses message timestamp in milliseconds as a key
-- so chat would send a message with ms timestamp x, it would get
encoded as @da x, but then when it went back through the conversion to
milliseconds, it would often (not always) get encoded as x-1.

I still do not fully understand why this is -- and why it doesn't seem
to be a problem with seconds based on cursory testing -- but integer
multiplication and division generally do not invert. And adding a half a
millisecond to the input date before converting it resolves the issue
and makes the functions invertible.

I added a regression test, so hopefully the next courageous adventurer
who winds up here after wondering why +unm looks funny will have a
safeguard against some of the mistakes I made.
2021-03-12 20:06:10 +00:00
..
contain Fix capped queues to not crash when the size is set to 0. 2019-08-06 14:59:33 -07:00
crypto hoon: renames +new-end, +new-lsh, +new-rsh 2020-12-02 01:00:09 -08:00
format.hoon zuse: fix time fix regression 2021-03-12 20:06:10 +00:00
html.hoon Add unit tests for json de/serialization. 2020-04-06 13:35:21 -04:00
mimes.hoon zuse: moves lib/base64 2020-12-08 02:36:11 -08:00
ordered-map.hoon zuse: actually fix ordered-map +traverse this time 2021-02-26 22:37:11 -05:00