Fix time-span calculation. (#635)

This commit is contained in:
Miguel Medeiros 2021-07-18 09:42:59 -03:00 committed by GitHub
parent 21db5a4102
commit 03ce592ab0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ export class TimeSpanComponent implements OnInit, OnChanges, OnDestroy {
} }
calculate() { calculate() {
const seconds = Math.floor((+new Date() - +new Date(this.time * 1000)) / 1000); const seconds = Math.floor(this.time);
if (seconds < 60) { if (seconds < 60) {
return $localize`:@@date-base.just-now:Just now`; return $localize`:@@date-base.just-now:Just now`;
} }