Here you can find the source of getTimeZone()
private static TimeZone getTimeZone()
//package com.java2s; import java.util.TimeZone; public class Main { public static final int TIME_ZONE_OFFSET = 3; private static TimeZone getTimeZone() { if (TIME_ZONE_OFFSET > 0) { return TimeZone.getTimeZone("GMT+" + TIME_ZONE_OFFSET); }/*from www .ja va 2 s . c o m*/ if (TIME_ZONE_OFFSET < 0) { return TimeZone .getTimeZone("GMT-" + Math.abs(TIME_ZONE_OFFSET)); } return TimeZone.getTimeZone("GMT+0"); } }