Date formate java program (IST to GMT)

Dear friends,

This is a java program, where is accept date coming from outside. I am converting date object to string to specific date format MM/dd/yyyy hh.mm.ss. Date coming from out is 4/28/2006 12:29:34 IST format but it is giving the result in different format. 04/28/2006 06.59.34
I need to know why this time is getting converted.
How to get that same time. 4/28/2006 12:29:34 IST

Public static void main(IDATAPIPELINE)throws ServerException 
{
IDataCursor idc = pipeline.getCursor();
            idc.first("dateObject");
            if(idc.getValue()!=null)
            {
                  Date dateObject=(Date)idc.getValue();
                  DateFormat df =  DateFormat.getDateInstance();
DateFormat format3 = new SimpleDateFormat( "MM/dd/yyyy hh.mm.ss" );
                  String strDate=format3.format(dateObject);
  idc.insertAfter("dateString", strDate);

            }

            idc.destroy();

} 

Input

4/28/2006 12:29:34 IST

Out Put: -

04/28/2006 06.59.34

Please help me lot. Thanks in advances

Regards
Balachandra.k

Balachanda,

Why are you doing this in a java service? Try the pub.date:dateTimeFormat built-in service instead.

Mark

exactly , the date format service is available in transformers. why dont u use that .

Your pattern string “MM/dd/yyyy hh.mm.ss” is not correct for the output you want. Research the pattern strings for the pub.date:dateTimeFormat that Mark mentions above (page 66 in the Built-in Services guide for 6.1).