Here you can find the source of getTimeZone(int rawoffset)
private static TimeZone getTimeZone(int rawoffset)
//package com.java2s; import java.util.TimeZone; public class Main { private static TimeZone getTimeZone(int rawoffset) { String[] timeZoneIds = TimeZone.getAvailableIDs(rawoffset); if (timeZoneIds.length == 0) { return TimeZone.getDefault(); }//from w ww. j a v a 2 s. co m TimeZone result = TimeZone.getTimeZone(timeZoneIds[0]); return null == result ? TimeZone.getDefault() : result; } }