contacts: format_timestamp treats Unix seconds as days #76

Closed
opened 2026-04-20 08:01:02 +00:00 by zaelgohary · 1 comment
Member

contact_detail.rs:273-287 does let days = ts / 86400 then checks against 365.

created_at / updated_at are Unix seconds (~1.7e9), so every real timestamp renders as ~55 000 years ago.

Fix: match the messaging pattern — diff against platform::current_timestamp_ms() / 1000, format relative or absolute based on age.

`contact_detail.rs:273-287` does `let days = ts / 86400` then checks against 365. `created_at` / `updated_at` are Unix seconds (~1.7e9), so every real timestamp renders as ~55 000 years ago. Fix: match the messaging pattern — diff against `platform::current_timestamp_ms() / 1000`, format relative or absolute based on age.
Author
Member

Dropping this. We decided not to show Created/Updated to users, so no formatter is needed. #77 still covers the server-state correctness piece (form no longer zeroes stored timestamps).

Dropping this. We decided not to show Created/Updated to users, so no formatter is needed. #77 still covers the server-state correctness piece (form no longer zeroes stored timestamps).
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#76
No description provided.