I am getting the timezone
of a android device using this code
TimeZone tz = TimeZone.getDefault();
String current_Time_Zone = (TimeZone.getTimeZone(tz.getID()).getDisplayName(
false, TimeZone.SHORT))
But it always return me the timezone
like "IST
" but i want to get the timezone in GMT
like this GMT+7:00.
I've been looking at this too and trying to work out how to apply timezone and DST. Here's my code.
This seems to work, but is there a better way to get the actual time off the device which represents a time that is meaningful and accurate to the user?
You can get your custom GMT time from this function from here