I am able to get the time as well as timezone currently. but it always printed in
Wed May 23 11:01:08 GMT+05:30 2012
As TimeZone i am getting GMT+05:30
. instead of this i want to print IST
I tried
SimpleDateFormat sd = new SimpleDateFormat("yyyy.MM.dd G 'at' HH:mm:ss z");
but still i am getting GMT+05:30
TimeZone.getDefault().getDisplayName(true, TimeZone.SHORT); is also givine me GMT+05:30
There are various things i tried but did not get desire ouput. I have used Calender
but still unable to print IST
.
Can anyone please let me know how to print IST
in Time (even i dont want to print Indian standard time
)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…