How to remove the 'Z' (Zulu Time) from the TIBCO Data Virtualization published web services "Date Time Format"?

How to remove the 'Z' (Zulu Time) from the TIBCO Data Virtualization published web services "Date Time Format"?

book

Article ID: KB0070206

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

By default, TIBCO Data Virtualization 'Date and time' format of published web services, uses single quotes '' to wrap literal text and use $ to indicate the end of pattern for DATE/TIME/TIMESTAMP: DATE:yyyy'-'MM'-'dd$TIME:HH':'mm':'ss'.'nnnnnnnnn'Z'$TIMESTAMP:yyyy'-'MM'-'dd'T'hh':'mm':'ss'.'nnnnnnnnn'Z'$.

Z
here is Zulu Time. By default, the format conforms to ISO8601 if a pattern is not defined. 

Issue/Introduction

How to remove the 'Z' from the TIBCO Data Virtualization published web services "Date Time Format"?

Resolution

Here are the instructions to help remove the "Z" Zulu part from the "Date Time Format" of the TDV-published web services 

1. Navigate to the [TDV_Server_Dir]/apps/server directory. Edit the latest "server_defs-<HF>.xml file". For example, if there are two files in there as below, edit the latest one i.e., server_defs-080500001. We suggest you make a copy of this file before you edit it. 

- server_defs-080500001.xml
- server_defs.xml

Note: Make a backup copy of this file before editing it 

2. Search and edit the "/server/webservices/DateTimeFormat" tag to replace the <common:pattern> tag value with the below-highlighted value and save it.
===================
  <common:attributeDef>
    <common:name>/server/webservices/DateTimeFormat</common:name>
    <common:type>STRING</common:type>
    <common:updateRule>READ_WRITE</common:updateRule>
    <common:annotation>Date and time format of web services, use single quotes '' to wrap literal text and use $ to indicate the end of pattern for DATE/TIME/TIMESTAMP:
                       DATE:yyyy'-'MM'-'dd$TIME:HH':'mm':'ss'.'nnnnnnnnn'Z'$TIMESTAMP:yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'nnnnnnnnn'Z'$
                       By default the format is conform to ISO8601 if pattern is not defined. Pattern letters are defined as following:
        &lt;li&gt;yyyy or yy: year
        &lt;li&gt;MM: month of year
        &lt;li&gt;dd: day of month
        &lt;li&gt;hh: clockhour of halfday (1-12)
        &lt;li&gt;HH: hour of day (0-23)
        &lt;li&gt;kk: clock hour of day (1-24)
        &lt;li&gt;KK: hour of halfday (0-11)  
        &lt;li&gt;a: am/pm of day 
        &lt;li&gt;mm: minute of hour 
        &lt;li&gt;ss: second of minute
        &lt;li&gt;SSS: fraction of second 
        &lt;li&gt;nnnnnnnnn: nano of second             
    </common:annotation>
    <common:pattern>(?!(DATE\s*:\s*|TIME\s*:\s*|TIMESTAMP\s*:\s*).*?\1.*?$)(((DATE\s*:\s*('[^']+')?((yyyy|MM|yy|dd)('[^']+')?)+)|(TIME\s*:\s*('((?!n{9})[^'])+')?((hh|HH|KK|mm|ss|SSS|n{1,9}+|a)('((?!n{9})[^'])+')?)+)|(TIMESTAMP\s*:\s*('((?!n{9})[^'])+')?((yyyy|MM|yy|dd|hh|HH|KK|mm|ss|SSS|n{1,9}+|a)('((?!n{9})[^'])+')?)+))(\s*\$\s*)){0,3}</common:pattern>
    <common:defaultValue>DATE:yyyy'-'MM'-'dd$TIME:HH':'mm':'ss'.'nnnnnnnnn'Z'$TIMESTAMP:yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'nnnnnnnnn'Z'$
</common:defaultValue>
    <common:displayName>Date Time Format</common:displayName>
    <common:public>true</common:public>
  </common:attributeDef>
===================

3. Restart the TDV monitor service.
4. Navigate to TDV Studio >> Administration >> Configuration >> Server >> Web Services Interface >> Date Time Format. Set the value to:
DATE:yyyy'-'MM'-'dd$TIME:HH':'mm':'ss'.'n$TIMESTAMP:yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'n$
- Click on 'Apply' and 'Save'.
5. Check the TDV published web service behavior after making this change