From 5c097c83cba5a9154c62b92090380d69c6d26193 Mon Sep 17 00:00:00 2001 From: Paldiu Date: Sat, 6 Mar 2021 12:00:32 -0600 Subject: [PATCH 1/3] Here's to hoping this fixes that stupid ban crap. --- .../java/me/totalfreedom/totalfreedommod/util/FUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java b/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java index a6a62e2b..e32e4611 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java @@ -605,12 +605,12 @@ public class FUtil public static Date getUnixDate(long unix) { - return new Date(unix * 1000); + return new Date(unix); } public static long getUnixTime() { - return System.currentTimeMillis() / 1000L; + return Instant.now().getEpochSecond(); } public static long getUnixTime(Date date) @@ -620,7 +620,7 @@ public class FUtil return 0; } - return date.getTime() / 1000L; + return date.getTime(); } public static String getNMSVersion() From 150e25072aa6324c6f23de3a0fd3643d17576bc4 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 6 Mar 2021 19:14:46 +0000 Subject: [PATCH 2/3] Tell CodeQL we're using Java 11 hopefully --- .github/workflows/codeql-analysis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9b81405f..dbeaac5d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,6 +36,12 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + + - name: Setup Java JDK + uses: actions/setup-java@v1.4.3 + with: + # The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x). Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28 + java-version: 11 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 694d9614c5b70152686685beac67110ba7e9b58d Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 6 Mar 2021 19:28:38 +0000 Subject: [PATCH 3/3] Tell Maven to also build Java 11 for once --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 76a2ae1d..59cede28 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -12,6 +12,6 @@ jobs: - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 11 - name: Build with Maven run: mvn -B package --file pom.xml