We are using XML Beans in our application.
 
Our schema uses 
 
Here is our schema for datetime:
  <xs:simpleType name="UTCTimestamp">
    <xs:annotation>
      <xs:documentation>String representing Time/date combination
represented in UTC (Universal Time Coordinated, also known as "GMT") in
either YYYYMMDD-HH:MM:SS (whole seconds) or YYYYMMDD-HH:MM:SS.sss
(milliseconds) format, colons, dash, and period required.   
 Valid values:
 * YYYY = 0000-9999, MM = 01-12, DD = 01-31, HH = 00-23, MM = 00-59, SS
= 00-60 (60 only if UTC leap second) (without milliseconds).
 * YYYY = 0000-9999, MM = 01-12, DD = 01-31, HH = 00-23, MM = 00-59, SS
= 00-60 (60 only if UTC leap second), sss=000-999 (indicating
milliseconds).
Leap Seconds:  Note that UTC includes corrections for leap seconds,
which are inserted to account for slowing of the rotation of the earth.
Leap second insertion is declared by the International Earth Rotation
Service (IERS) and has, since 1972, only occurred on the night of Dec.
31 or Jun 30. The IERS considers March 31 and September 30 as secondary
dates for leap second insertion, but has never utilized these dates.
During a leap second insertion, a UTCTimestamp field may read
"19981231-23:59:59", "19981231-23:59:60", "19990101-00:00:00".  (see
http://tycho.usno.navy.mil/leapsec.html)
</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:dateTime" />
  </xs:simpleType>

 
  <xs:simpleType name="TransactTime_t">
    <xs:annotation>
      <xs:documentation xml:lang="en">
      Time of execution/order creation (expressed in UTC (Universal Time
Coordinated, also known as "GMT")
    </xs:documentation>
      <xs:appinfo>
        <fm:Xref Protocol="FIX" name="TransactTime" tag="60"
datatype="UTCTimestamp" ComponentType="Field" StdAbbrev="TxnTm"
Category="" CategoryAbbrev="" />
      </xs:appinfo>
    </xs:annotation>
    <xs:restriction base="UTCTimestamp" />
  </xs:simpleType>

I believe that internally it uses XmlCalender class to set the value for
transaction time.
 
Here is my implementation:
   public void setTransactionTime(Calendar transactionTime)
   {
      if (transactionTime != null)
      {
         transactionTime.clear(Calendar.MILLISECOND);
         _message.setTxnTm(transactionTime);
      }
      else if ( _message.isSetTxnTm() )
      {
         _message.unsetTxnTm();
      }
   }

We need this field in the format of 2008-06-30T13:26:20-0500
 
But I am getting the value in the format of 2008-06-30T13:26:20-05:00
 
I would like to remove colon (:) from timezone difference.
 
Does any body have any idea how to get datetime field in custom format?

Thanks

Vijaya Manne
IntercontinentalExchange | ICE
2100 RiverEdge Pkwy | 5th Floor | Atlanta, GA 30328
Tel: 770.857.0371
[EMAIL PROTECTED]



Production Issues Logging
https://www.theice.com/integrate <https://www.theice.com/integrate> 

24-hour ice helpdesk 770.738.2101
http://www.theice.com <http://www.theice.com/>
 
--------------------------------------------------------
This message may contain confidential information and is intended for specific 
recipients unless explicitly noted otherwise. If you have reason to believe you 
are not an intended recipient of this message, please delete it and notify the 
sender. This message may not represent the opinion of IntercontinentalExchange, 
Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract 
or guarantee. Unencrypted electronic mail is not secure and the recipient of 
this message is expected to provide safeguards from viruses and pursue 
alternate means of communication where privacy or a binding message is desired.

Reply via email to