diff options
author | Eylon Malin <eylon.malin@intl.att.com> | 2019-08-08 18:01:34 +0300 |
---|---|---|
committer | Eylon Malin <eylon.malin@intl.att.com> | 2019-08-08 18:01:34 +0300 |
commit | 0fb8126743bafee2518fb1a0c12877a6ad2690f3 (patch) | |
tree | 80c0ca44c43c9155615eccf9ec56eff2c980e4f9 | |
parent | 392a01601a0dc99b47b63c02659d20b1d60d87c4 (diff) |
set VID to use internally UTC timezone
Issue-ID: VID-378
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Change-Id: I4b062d4a7ec68e564c46a094a75739dc9ad0355b
-rw-r--r-- | epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java | 11 |
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"); |