From ffc7f1748af7f3290461f5072fa6a3526863ef85 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Mon, 19 Oct 2020 17:43:05 +0100 Subject: [PATCH] fix conversion logic --- .../main/groovy/com/muwire/core/hostcache/H2HostCache.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/groovy/com/muwire/core/hostcache/H2HostCache.groovy b/core/src/main/groovy/com/muwire/core/hostcache/H2HostCache.groovy index dea1f270..564d7b90 100644 --- a/core/src/main/groovy/com/muwire/core/hostcache/H2HostCache.groovy +++ b/core/src/main/groovy/com/muwire/core/hostcache/H2HostCache.groovy @@ -141,7 +141,7 @@ class H2HostCache extends HostCache { long timestamp = System.currentTimeMillis() if (entry.lastSuccessfulAttempt != null) timestamp = entry.lastSuccessfulAttempt - def tstamp = Date(timestamp) + def tstamp = new Date(timestamp) tstamp = SDF.format(tstamp) sql.execute("insert into HOST_ATTEMPTS VALUES ('${dest.toBase64()}', '$tstamp', 'SUCCESSFUL')") }