From 9b8894240ed7d56e41816f8e6956028d88c17826 Mon Sep 17 00:00:00 2001 From: Pahansith Date: Mon, 3 May 2021 11:21:05 +0530 Subject: [PATCH] Add DAO fix for app schedule subscription (cherry picked from commit 0060083499a411ef79ada46d44c718d61218334d) --- .../core/dao/impl/subscription/GenericSubscriptionDAOImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java index 7018ca662f..c6937a05a8 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java @@ -1037,7 +1037,7 @@ public class GenericSubscriptionDAOImpl extends AbstractDAOImpl implements Subsc try (PreparedStatement stmt = conn.prepareStatement(sql)) { stmt.setString(1, ExecutionStatus.PENDING.toString()); stmt.setBoolean(2, false); - stmt.setTimestamp(3, new Timestamp(Calendar.getInstance().getTime().getTime())); + stmt.setLong(3, Calendar.getInstance().getTime().getTime() / 1000); try (ResultSet rs = stmt.executeQuery()) { return DAOUtil.loadScheduledSubscriptions(rs); }