From 43770fa9bd0ab99d7ea800e65e368c58a30a21d3 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sun, 18 Aug 2024 12:56:36 +0100 Subject: [PATCH] Remove usage of deprecated legacy Java Date API I've been staring at this warning for years, and ignored it thinking it would be a pain to fix. I'm a fool! --- .../src/main/java/dan200/computercraft/core/apis/OSAPI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/core/src/main/java/dan200/computercraft/core/apis/OSAPI.java b/projects/core/src/main/java/dan200/computercraft/core/apis/OSAPI.java index e31f76d73..49c75e8cb 100644 --- a/projects/core/src/main/java/dan200/computercraft/core/apis/OSAPI.java +++ b/projects/core/src/main/java/dan200/computercraft/core/apis/OSAPI.java @@ -122,7 +122,7 @@ public class OSAPI implements ILuaAPI { } private static long getEpochForCalendar(Calendar c) { - return c.getTime().getTime(); + return c.getTimeInMillis(); } /**