File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -73,11 +73,11 @@ func DifferenceStr(t1 *time.Time, t2 *time.Time) string {
7373 if durationSecs < 60 {
7474 return strconv .Itoa (durationSecs ) + "s"
7575 } else if durationSecs < 3600 {
76- return strconv .Itoa (durationSecs / 60 ) + "m"
76+ return strconv .Itoa (durationSecs / 60 ) + "m" + strconv . Itoa ( durationSecs - durationSecs / 60 * 60 ) + "s"
7777 } else if durationSecs < 48 * 3600 {
78- return strconv .Itoa (durationSecs / 3600 ) + "h"
78+ return strconv .Itoa (durationSecs / 3600 ) + "h" + strconv . Itoa (( durationSecs - durationSecs / 3600 * 3600 ) / 60 ) + "m"
7979 } else {
80- return strconv .Itoa (durationSecs / (24 * 3600 )) + "d"
80+ return strconv .Itoa (durationSecs / (24 * 3600 )) + "d" + strconv . Itoa (( durationSecs - durationSecs / ( 24 * 3600 ) * ( 24 * 3600 )) / 3600 ) + "h"
8181 }
8282}
8383
You can’t perform that action at this time.
0 commit comments