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
Describe the bug
When parsing date-time with when:so and the fractional seconds are malformed it truncates the result to the hour/minute/second component.
When hour/minute/second is malformed it truncates to date.
Unit tests: I don't see an existing file appropriate for unit testing this.
I suggest adding time.hoon to tests/sys, or make a new directory path in tests. This file would be appropriate for testing time and time-range parsing and manipulations.
Describe the bug
When parsing date-time with
when:so
and the fractional seconds are malformed it truncates the result to the hour/minute/second component.When hour/minute/second is malformed it truncates to date.
To Reproduce
(wonk (when:so [[1 1] "2020.12.25..7.15.1..9ef"]))
[[%.y 2.020] 12 25 [7 15 1 ~]]
(wonk (when:so [[1 1] "2020.12.25..7.15."]))
[[%.y 2.020] 12 25 [0 0 0 ~]]
Expected behaviour
hoon expression failed
The fix
Change 2 LOC in hoon.hoon when:so
The text was updated successfully, but these errors were encountered: