X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/be1ce532b26aea4e3e2258da78849bd245f7f78b..3d65cb04707cf3af11885995fd1110a5971d8b00:/src/lib/components/topic/topic.svelte diff --git a/src/lib/components/topic/topic.svelte b/src/lib/components/topic/topic.svelte index ec89876..7fb4101 100644 --- a/src/lib/components/topic/topic.svelte +++ b/src/lib/components/topic/topic.svelte @@ -7,41 +7,50 @@ import Post from '$lib/components/post/post.svelte'; import { readableTime } from '$lib/utils/readable_time'; - $: remainingTime = topic.updated_at + topic.ttl - Date.now(); + $: remainingTime = new Date(topic.updated_at).getTime() + topic.ttl - Date.now(); $: remaining = readableTime(remainingTime);