From 52b86851499b0b67b82b0da0848031ad5e6ab8b6 Mon Sep 17 00:00:00 2001 From: prathabanKavin Date: Mon, 15 May 2023 13:51:49 +0530 Subject: [PATCH] Use timestamp insted of Date class --- .../mgt/dao/impl/operation/SQLServerOperationDAOImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/operation/SQLServerOperationDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/operation/SQLServerOperationDAOImpl.java index f4a29ffc86..cebe9beda9 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/operation/SQLServerOperationDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/operation/SQLServerOperationDAOImpl.java @@ -194,7 +194,7 @@ public class SQLServerOperationDAOImpl extends GenericOperationDAOImpl { operation = new Operation(); operation.setId(rs.getInt("ID")); operation.setType(Operation.Type.valueOf(rs.getString("TYPE"))); - operation.setCreatedTimeStamp(new Date(rs.getLong("CREATED_TIMESTAMP")).toString()); + operation.setCreatedTimeStamp(new Timestamp(rs.getLong("CREATED_TIMESTAMP") * 1000L).toString()); if (rs.getLong("UPDATED_TIMESTAMP") == 0) { operation.setReceivedTimeStamp(""); } else {