forked from forgejo/forgejo
Store and use seconds for timeline time comments (#25392)
this will allow us to fully localize it later PS: we can not migrate back as the old value was a one-way conversion prepare for #25213 --- *Sponsored by Kithara Software GmbH*
This commit is contained in:
parent
a954c93a68
commit
b0215c40cd
6 changed files with 67 additions and 18 deletions
|
@ -15,7 +15,9 @@ import (
|
|||
// 1563418 -> 2 weeks 4 days
|
||||
// 3937125s -> 1 month 2 weeks
|
||||
// 45677465s -> 1 year 6 months
|
||||
func SecToTime(duration int64) string {
|
||||
func SecToTime(durationVal any) string {
|
||||
duration, _ := ToInt64(durationVal)
|
||||
|
||||
formattedTime := ""
|
||||
|
||||
// The following four variables are calculated by taking
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue