forked from MagicBane/Server
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
@@ -11,7 +11,7 @@ package engine.objects;
|
||||
|
||||
import engine.Enum.GameObjectType;
|
||||
import engine.Enum.TransactionType;
|
||||
import org.joda.time.DateTime;
|
||||
import java.time.Instant;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
@@ -23,7 +23,7 @@ public class Transaction implements Comparable<Transaction> {
|
||||
private final int warehouseUUID;
|
||||
private final int targetUUID;
|
||||
private final Resource resource;
|
||||
private final DateTime date;
|
||||
private final Instant date;
|
||||
private final int amount;
|
||||
private final TransactionType transactionType;
|
||||
private GameObjectType targetType;
|
||||
@@ -40,15 +40,15 @@ public class Transaction implements Comparable<Transaction> {
|
||||
Date sqlDateTime = rs.getTimestamp("date");
|
||||
|
||||
if (sqlDateTime != null)
|
||||
this.date = new DateTime(sqlDateTime);
|
||||
this.date = sqlDateTime.toInstant();
|
||||
else
|
||||
this.date = DateTime.now();
|
||||
this.date = Instant.now();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Transaction(int warehouseUUID, GameObjectType targetType, int targetUUID, TransactionType transactionType, Resource resource, int amount,
|
||||
DateTime date) {
|
||||
Instant date) {
|
||||
this.warehouseUUID = warehouseUUID;
|
||||
this.targetUUID = targetUUID;
|
||||
this.resource = resource;
|
||||
@@ -74,7 +74,7 @@ public class Transaction implements Comparable<Transaction> {
|
||||
}
|
||||
|
||||
|
||||
public DateTime getDate() {
|
||||
public Instant getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user