CreateRoot2 #7
|
@ -2,6 +2,8 @@ package com.example.oplogy;
|
|||
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.firebase.Timestamp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CreateRoot {
|
||||
|
@ -13,6 +15,14 @@ public class CreateRoot {
|
|||
}
|
||||
Log.d("CreateRoot", "myDataList[0]: " + myDataList.get(0).toString());
|
||||
|
||||
for (MyDataClass data : myDataList) {
|
||||
Log.d("CreateRoot", "data: " + data.toString());
|
||||
Timestamp startTime = data.getFirstDay().get(0);
|
||||
Timestamp endTime = data.getFirstDay().get(1);
|
||||
Long timezone = endTime.getSeconds() - startTime.getSeconds();
|
||||
data.setTimezone(timezone);
|
||||
Log.d("CreateRoot", "timezone: " + timezone);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ public class MyDataClass {
|
|||
List<Timestamp> thirdDay;
|
||||
List<Timestamp> secondDay;
|
||||
double latitude;
|
||||
private Long Timezone;
|
||||
|
||||
public MyDataClass(String patronName, int classId, List<String> address, List<Timestamp> firstDay, int studentNumber, String childName, List<Timestamp> thirdDay, List<Timestamp> secondDay) {
|
||||
this.patronName = patronName;
|
||||
|
@ -52,6 +53,8 @@ public class MyDataClass {
|
|||
public List<Timestamp> getFirstDay() {
|
||||
return firstDay;
|
||||
}
|
||||
|
||||
|
||||
public int getStudentNumber() {
|
||||
return studentNumber;
|
||||
}
|
||||
|
@ -95,4 +98,8 @@ public class MyDataClass {
|
|||
public void setLatitude(double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public void setTimezone(Long Timezone) {
|
||||
this.Timezone=Timezone;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user