1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

Fixed Event.getDuration() to return minutes and not seconds

This commit is contained in:
Christophe Beyls 2017-01-05 23:51:27 +01:00
parent c8a1fdef78
commit 67e5ea57af

View file

@ -3,6 +3,7 @@ package be.digitalia.fosdem.model;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.format.DateUtils;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -73,7 +74,7 @@ public class Event implements Parcelable {
if ((startTime == null) || (endTime == null)) { if ((startTime == null) || (endTime == null)) {
return 0; return 0;
} }
return (int) ((this.endTime.getTime() - this.startTime.getTime()) / 1000L); return (int) ((this.endTime.getTime() - this.startTime.getTime()) / DateUtils.MINUTE_IN_MILLIS);
} }
public String getRoomName() { public String getRoomName() {