format_time(0) renders misleading "00:00" #55

Closed
opened 2026-04-19 08:25:36 +00:00 by zaelgohary · 1 comment
Member

format_time(0) returned "00:00" (looks like a real clock time) and format_relative_time(0) routed through format_date(0) and rendered something near Jan 1 1970. Both are confusing when the real meaning is 'no timestamp available'.

Fix: return "" early for timestamp == 0 in both helpers.

`format_time(0)` returned `"00:00"` (looks like a real clock time) and `format_relative_time(0)` routed through `format_date(0)` and rendered something near `Jan 1 1970`. Both are confusing when the real meaning is 'no timestamp available'. **Fix**: return `""` early for `timestamp == 0` in both helpers.
zaelgohary changed title from bug: format_time / format_relative_time show misleading output for timestamp=0 to format_time(0) renders misleading "00:00" 2026-04-19 08:32:20 +00:00
Author
Member

Fixed by #56.

Fixed by https://forge.ourworld.tf/lhumina_code/hero_archipelagos/pulls/56.
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#55
No description provided.