How To Get The Unique TimeZone Display Name In All The Android Devices?
I have used the below code to get the android mobile timezone display name. String mobileTimeZone = Calendar.getInstance().getTimeZone() .getDisplayName(false, TimeZone.SH
Solution 1:
I see the same GMT+5:30 on my Huawei Phone (android 4.4.2).
Please note that the use of two or three character time zone identifiers is deprecated. This is because they are in fact NOT unique. The same value can actually represent different time zones (e.g. CST can mean Central Standard Time and also China Standard Time - see javadoc for Timezone for more information).
If you need a unique identifier for a Timezone, use the getID() method on the Timezone class. This will return a value like "Asia/Kolkata". This same value can be used to construct a TimeZone using TimeZone.getTimeZone("Asia/Kolkata").
Post a Comment for "How To Get The Unique TimeZone Display Name In All The Android Devices?"