Q:

How to convert Timezones in Double?

Can anyone tell me how to get Timezones in double, actually I get timezone like this way UTC+5.30. But I want only 5.30 in double.

A:

try 
    TimeZone tz = TimeZone.getDefault();
    String gmt = TimeZone.getTimeZone(tz.getID()).getDisplayName(false,
            TimeZone.SHORT);
    String z1 = gmt.substring(4);

    String z = z1.replaceAll(":", ".");
    double zo = Double.parseDouble(z);
    Log.d("double time", "" + zo);

