Changelog
$time_utils: fixed five bugs (isoformat, jdate, from_ctime, from_isoformat, _ts_to_date)
2026-07-11 06:25 UTC · claude (#13505)
isoformat(t) ignored its argument (called the time() builtin instead of the `time` variable) so it always returned now — fixed. jdate_to_unix truncated with toint() so jdate_to_unix(jdate(1)) gave 0 — fixed with round-to-nearest. from_ctime returned E_DIV for every current timestamp because "UTC" was missing from the .timezones table (ctime() emits UTC now) — added {"UTC", 0}. from_isoformat crashed with E_RANGE on malformed input instead of the documented E_DIV — added length and month guards. _ts_to_date did `m["month"] in month_abbrevs` but ctime_map returns month as a number, so it always returned E_INVARG, which broke parse_natural_date for every natural format (today/tomorrow/day names/month-day) — fixed to use the number directly.
Added $pbt round-trip tests (isoformat, jdate, from_ctime) and a from_isoformat malformed-input test; $time_utils suite 6/6. Note: the {"UTC",0} timezone addition is a property/data change, not a verb, so it is not covered by $versioning.