chat list: Jan 1970 timestamps #44

Closed
opened 2026-04-19 08:25:32 +00:00 by zaelgohary · 0 comments
Member

services::conversation_to_preview stored last_activity as seconds-since-epoch, but format_relative_time / format_date in islands/mod.rs expect milliseconds. The seconds-value looks like a timestamp ~54 years in the past, so days > 7 is always true and the code takes the format_date(timestamp) branch, which then formats a seconds-value as ms and renders something near the Unix epoch.

Similar issue in chatmessage_to_messagedatamsg.created_at (secs) was passed through as timestamp without conversion.

Fix: multiply by 1000 at both conversion sites.

`services::conversation_to_preview` stored `last_activity` as seconds-since-epoch, but `format_relative_time` / `format_date` in `islands/mod.rs` expect milliseconds. The seconds-value looks like a timestamp ~54 years in the past, so `days > 7` is always true and the code takes the `format_date(timestamp)` branch, which then formats a seconds-value as ms and renders something near the Unix epoch. Similar issue in `chatmessage_to_messagedata` — `msg.created_at` (secs) was passed through as `timestamp` without conversion. **Fix**: multiply by 1000 at both conversion sites.
zaelgohary changed title from bug: chat list shows epoch (Jan 1970) timestamps to chat list: Jan 1970 timestamps 2026-04-19 08:32:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_archipelagos#44
No description provided.