How to convert Timezone into specified formate? - TechRepublic
Question
November 6, 2012 at 11:36 PM
unamepwd786

How to convert Timezone into specified formate?

by unamepwd786 . Updated 13 years, 7 months ago

Actually my java code like this…..
Ex:
SimpleDateFormat sourceFormat = new SimpleDateFormat(“z”);
SimpleDateFormat gmtFormat = new SimpleDateFormat(“‘GMT(‘Z’)'”);
date1 = gmtFormat.format(sourceFormat.parse(“IST”));

O/p:GMT(+0530) for example we are passing “PST” it will show GMT(-0800) but my example will show always GMT(+0530)….

This discussion is locked

All Comments