Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static int timeZoneOffset() { Calendar cal = Calendar.getInstance(); int offset = (cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)) / (60 * 1000); return offset; } }