diff options
Diffstat (limited to 'epsdk-app-onap/src/main/java/org')
-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"); |