Complete JodaTime -> java.time migration (remaining objects, db handlers, net msg, jobs) + QC pass; untrack working reference files
This commit is contained in:
1 parent
efd35e89f1
commit
93eb77fcc8
26 files changed
+160
-426
No files matched your search
@@ -13,10 +13,11 @@ package engine.objects;
|
||||
import engine.Enum.GameObjectType;
|
||||
import engine.Enum.GuildHistoryType;
|
||||
import engine.net.ByteBufferWriter;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
|
||||
|
||||
public class GuildHistory {
|
||||
@@ -24,12 +25,12 @@ public class GuildHistory {
|
||||
|
||||
private int guildID;
|
||||
private String guildName;
|
||||
private DateTime time;
|
||||
private Instant time;
|
||||
private GuildHistoryType historyType;
|
||||
|
||||
|
||||
public GuildHistory(int guildID, String guildName,
|
||||
DateTime dateTime, GuildHistoryType historyType) {
|
||||
Instant dateTime, GuildHistoryType historyType) {
|
||||
super();
|
||||
this.guildID = guildID;
|
||||
this.guildName = guildName;
|
||||
@@ -49,9 +50,9 @@ public class GuildHistory {
|
||||
|
||||
sqlDateTime = rs.getTimestamp("historyDate");
|
||||
if (sqlDateTime != null)
|
||||
this.time = new DateTime(sqlDateTime);
|
||||
this.time = sqlDateTime.toInstant();
|
||||
else
|
||||
this.time = DateTime.now().minusYears(1);
|
||||
this.time = Instant.now().minus(1, ChronoUnit.YEARS);
|
||||
this.historyType = GuildHistoryType.valueOf(rs.getString("historyType"));
|
||||
}
|
||||
|
||||
@@ -77,11 +78,11 @@ public class GuildHistory {
|
||||
writer.putDateTime(this.time);
|
||||
}
|
||||
|
||||
public DateTime getTime() {
|
||||
public Instant getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(DateTime time) {
|
||||
public void setTime(Instant time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user