aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-08-12 07:53:22 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-12 07:53:22 +0000
commit25c073d46559a2a06e939e0b26bbb27d14a4ea2c (patch)
tree8dd0961823da02a805a221c8911ee80ca355adf4
parent47cc63c50442005b3ac051d4c4e3037139b7f1e5 (diff)
parent0fb8126743bafee2518fb1a0c12877a6ad2690f3 (diff)
Merge "set VID to use internally UTC timezone"
-rw-r--r--epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java
index 7c1b5c693..ca317dde2 100644
--- a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java
+++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java
@@ -37,11 +37,12 @@
*/
package org.onap.portalapp.conf;
+import java.util.TimeZone;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
import org.onap.portalsdk.core.conf.AppInitializer;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import java.util.TimeZone;
-
public class ExternalAppInitializer extends AppInitializer {
private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(ExternalAppInitializer.class);
@@ -54,6 +55,12 @@ public class ExternalAppInitializer extends AppInitializer {
return new Class[] { appConfigClass };
}
+ @Override
+ public void onStartup(ServletContext servletContext) throws ServletException {
+ super.onStartup(servletContext);
+ setDefaultTimeZoneToUTC();
+ }
+
//set time zone to UTC so Dates would be written to DB in UTC timezone
private void setDefaultTimeZoneToUTC() {
System.setProperty("user.timezone", "UTC");