ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How to change Date/Time Format in OneClick WebApp

book

Article ID: 237254

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

OneClick WebApp shows the Date/Time format as for example "Mar 4, 2022 20:14:07 CET".

While we may want to have it showing for example like "04.03.2022 20:14:07 MEZ" , which is the date/time format shown in the OneClick Java Console on the local Client.

In this example the local Client is on Windows with JRE and language settings are German.
The OneClick Server is running on a Linux system, whose language settings are "en_US.UTF-8".

What should we change to get WebApp showing Date/Time in another format, like OneClick Java console does?

 

Environment

Release : 21.2

Component : Spectrum OneClick

Resolution

We can control the timezone in WebApp with the JVM options.  This is referenced in the JVM arguments on the configuration page of the WebApp - by default it has these parameters:

-Xmx1024m -Djavaws.cfg.jauthenticator=true
-DbrowserIp=${clientIp}
-Dsun.awt.noerasebackground=true
-Duser.timezone=${clientTimeZone}
-Djavax.net.ssl.trustStore=${SPECROOT}/custom/keystore/cacerts
-Djavax.net.ssl.trustStorePassword=changeit


Adding the following properties to the JVM arguments to specify the country and locale setting to be used will allow to change the Date/Time format as required (in this case for German):
 
-Duser.country=DE -Duser.language=de

Additional Information

To access the WebApp configuration page: 

-Log in to the OneClick WebApp administration page: 
 default URL: https://<webapp-hostname>:<webapp-port>/spectrum
-Select Manage.
-Select Application, Config.