diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/common/GsonMessageBodyHandler.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/common/GsonMessageBodyHandler.java index 57e5c33e7e8..f069edee755 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/common/GsonMessageBodyHandler.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/common/GsonMessageBodyHandler.java @@ -40,6 +40,7 @@ import static javax.ws.rs.core.MediaType.APPLICATION_JSON; @Consumes(APPLICATION_JSON) public class GsonMessageBodyHandler implements MessageBodyWriter, MessageBodyReader { + public static final String DATE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z"; private Gson gson; private static final String UTF_8 = "UTF-8"; @@ -50,7 +51,7 @@ public class GsonMessageBodyHandler implements MessageBodyWriter, Messag private Gson getGson() { if (gson == null) { final GsonBuilder gsonBuilder = new GsonBuilder(); - gson = gsonBuilder.setDateFormat("EEE, d MMM yyyy HH:mm:ss Z").create(); + gson = gsonBuilder.setDateFormat(DATE_FORMAT).create(); } return gson; }