get timezone abbreviation in android

时间:2018-06-18 11:39:07

标签: android datetime timezone

I'm trying to get Timezone abbreviation for the given Timezone. Here is my code.

TimeZone  tz=TimeZone.getTimeZone("GMT+05:30");
Log.e("given time zone >>",tz.getDisplayName(false,TimeZone.SHORT));

But I get in log as GMT+05:30 only, I like to get IST (abbreviation). What I have done wrong?

0 个答案:

没有答案