UI: Messages show incorrect timestamps — 'Jan 21, 1970' for all conversations #53
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_os#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
All conversations in the Messages chat list display timestamps of "Jan 21, 1970" — which is clearly a Unix epoch-related bug. The dates should show actual message timestamps.
Visible in screenshots:
Steps to Reproduce
Expected
Relative timestamps ("2m ago", "5h ago") or actual dates for older messages.
Root Cause
Likely a timestamp unit mismatch — the stored timestamps may be in seconds while the formatter expects milliseconds (or vice versa). Unix timestamp 0 = Jan 1 1970, and a small integer timestamp like 1814400 would equal Jan 21 1970.
Severity
Medium — incorrect but doesn't block functionality
Screenshots
deep_msg_01_initial.png
Root Cause Found
File:
hero_archipelagos/archipelagos/messaging/src/services/messaging_service.rsline 234:conv.last_activityis in seconds since epoch, butformat_relative_time()inmessaging/src/islands/mod.rs:41callsplatform::current_timestamp_ms()(milliseconds) and computesdiff = now_ms - timestamp_seconds. This makes the diff ~54 years, which triggersformat_date(timestamp)— formatting a seconds-value as milliseconds gives a date near epoch (Jan 21, 1970).Fix:
Some(conv.last_activity as u64 * 1000)