Tags: longbridge/longbridge-terminal
Tags
cli: Fix `ipo_date` showing 1970 in IPO commands (#197) ## Summary - `ipo_date` from the API is a YYYYMMDD string (e.g. `"20260511"`). `fmt_date_opt` was parsing it as an integer `20260511`, then passing it to `format_date` as Unix seconds, producing a bogus 1970 date - Fixed `fmt_date_opt` to detect 8-digit and `YYYY-MM-DD` date strings early and return them directly, before the timestamp parsing path - Removed `"ipo_date"` from `TS_FIELDS` — it already has dedicated handling in `transform_ipo_list_item` - Fixed `wait_list_row` and `cmd_ipo_us_wait_listing` to use `fmt_date_opt` instead of `fmt_ts` for `ipo_date` ## Affected commands `ipo listed`, `ipo wait-listing`, `ipo calendar`, `ipo us-wait-listing` ## Test plan - [x] `ipo listed` — HK and US dates show correctly (e.g. `2026-05-11`) - [x] `ipo calendar` — `sub_date`, `sub_end_date`, `ipo_date` all correct - [x] `ipo wait-listing` — `ipo_date` correct 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
PreviousNext