Remove Timezone bullshit
This commit is contained in:
@@ -14,12 +14,12 @@ import java.nio.charset.StandardCharsets;
|
|||||||
|
|
||||||
public class APIFootballMatch extends BaseMatch {
|
public class APIFootballMatch extends BaseMatch {
|
||||||
|
|
||||||
private int season;
|
private final int season;
|
||||||
private int matchId;
|
private final int matchId;
|
||||||
private int leagueId;
|
private final int leagueId;
|
||||||
private String matchStatus;
|
private String matchStatus;
|
||||||
private String teamNameHome;
|
private final String teamNameHome;
|
||||||
private String teamNameGuest;
|
private final String teamNameGuest;
|
||||||
|
|
||||||
public APIFootballMatch(JSONObject json, int season) {
|
public APIFootballMatch(JSONObject json, int season) {
|
||||||
this.season = season;
|
this.season = season;
|
||||||
|
|||||||
@@ -136,13 +136,7 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
|
|||||||
{
|
{
|
||||||
for(APIFootballMatch apiFootballMatch : apiFootballMatches) {
|
for(APIFootballMatch apiFootballMatch : apiFootballMatches) {
|
||||||
TLWMatch tlwMatch = getMatchingMatch(apiFootballMatch, tlwMatches);
|
TLWMatch tlwMatch = getMatchingMatch(apiFootballMatch, tlwMatches);
|
||||||
OffsetDateTime offsetDateTime = OffsetDateTime.parse(apiFootballMatch.getMatchDateTime());
|
tlwMatch.setMatchDateTime(apiFootballMatch.getMatchDateTime().replace("T", " ").substring(0, 19));
|
||||||
ZonedDateTime now = ZonedDateTime.now();
|
|
||||||
ZoneOffset offsetNow = now.getOffset();
|
|
||||||
OffsetDateTime fixedDatetime = offsetDateTime.withOffsetSameInstant(offsetNow);
|
|
||||||
String newMatchTime = fixedDatetime.toString();
|
|
||||||
|
|
||||||
tlwMatch.setMatchDateTime(newMatchTime.replace("T", " ").substring(0, 16) + ":00");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user