invidious icon indicating copy to clipboard operation
invidious copied to clipboard

[Bug] "Shared X ago" display is sometimes offset by one month

Open SamantazFox opened this issue 3 years ago • 4 comments

Describe the bug The line saying "shared x ago" under videos (on a channel's page) are offset by one month. This seem to happen only to videos that are exactly between 2 and 3 months old.

Steps to Reproduce

  1. Search for a two months old video
  2. Shows "shared 1 month ago"

Screenshots On one specific video, that is a little over two months old: image image

On a channel that posts a video every two days, we can clearly see the jump: image

SamantazFox avatar Apr 09 '21 01:04 SamantazFox

This seems to be caused by the assumption that a month has 30 days in utils.cr: https://github.com/iv-org/invidious/blob/b7eba3bc178b76a733a142f475cdb83921d591c1/src/invidious/helpers/utils.cr#L214-L215

markozajc avatar Apr 10 '21 16:04 markozajc

This seems to be caused by the assumption that a month has 30 days in utils.cr [...]

I don't think so. If that was the issue, we would be able to properly see the "2 months ago" mark after 60 days. But the issue I describe is that "2 months ago" never shows up.

SamantazFox avatar Apr 11 '21 12:04 SamantazFox

This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.

github-actions[bot] avatar Sep 03 '22 02:09 github-actions[bot]

I need to check on that.

SamantazFox avatar Sep 11 '22 14:09 SamantazFox