Configure Timezone and Date Display
Timezone
By default, the Job Queue Manager times shown in SuperWEB2 (such as the time a job was submitted and the job expiry time) are in UTC/GMT:
To change the timezone to your local timezone:
-
Go to the Tomcat instance that is running SuperWEB2 and open <tomcat_home>\webapps\webapi\tableView\openTable.xhtml in a text editor.
Make a backup copy of this file before making any changes.
-
Locate the following section:
XML<h:outputText id="jobSubmitted" value="#{job.creation}" binding="#{downloadTableStatusBean.submittedDateBinding}"> <f:convertDateTime pattern="#{labels['tableView.downloadTable.recordList.dateFormat']}" /> </h:outputText>
-
Add a
timeZone
parameter to theconvertDateTime
element, and set it to your chosen time zone. For example Australia/ACT, Europe/Amsterdam or US/Eastern (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of time zone values):XML<h:outputText id="jobSubmitted" value="#{job.creation}" binding="#{downloadTableStatusBean.submittedDateBinding}"> <f:convertDateTime timeZone="Australia/ACT" pattern="#{labels['tableView.downloadTable.recordList.dateFormat']}" /> </h:outputText>
-
Locate the following section:
XML<h:outputText id="jobExpires" value="#{job.expiry}" binding="#{downloadTableStatusBean.expiryDateBinding}"> <f:convertDateTime pattern="#{labels['tableView.downloadTable.recordList.dateFormat']}" /> </h:outputText>
-
Add a
timeZone
parameter to theconvertDateTime
element and set it to your chosen time zone:XML<h:outputText id="jobExpires" value="#{job.expiry}" binding="#{downloadTableStatusBean.expiryDateBinding}"> <f:convertDateTime timeZone="Australia/ACT" pattern="#{labels['tableView.downloadTable.recordList.dateFormat']}" /> </h:outputText>
- Save your changes to openTable.xhtml. You may need to restart the SuperWEB2 Tomcat service to see your changes in the client.
Date Display
By default, the dates are displayed in the format dd/MM/yyyy '@' h:mm a (e.g. 05/09/2014 @ 3:25 PM).
You can change this if you want to use a different date format by editing the common_labels.properties files, located in <tomcat_home>\webapps\webapi\WEB-INF\classes
There may be multiple copies of this file for different languages and locales, with names like common_labels_en.properties and common_labels_de.properties. Each one contains the text used for different languages. Depending on which languages are in use on your deployment, you may need to make these changes in all versions of this file. The properties file that is used will depend on the language settings in the end user's web browser, the set of supported locales defined in the faces-config.xml configuration file, and the language selected by the user from the drop-down list . See Multilingual and Localisation Support for more information about localisation and how SuperWEB2 uses the properties files.
-
Open the common_labels.properties file in a text editor.
Make a backup copy of this file before making any changes.
-
Locate the following line:
XMLtableView.downloadTable.recordList.dateFormat=dd/MM/yyyy '@' h:mm a
-
Change the value to the pattern of your preferred date format. See the Java documentation for more details about the acceptable date formats.
For example:
XMLtableView.downloadTable.recordList.dateFormat=HH:mm E d MMM yyyy
- Save your changes.
Once you have completed the change for all locales, restart the SuperWEB2 Tomcat service to see the changes in the client.