Here you can find the source of getTimeZoneOffsetInMillis()
static long getTimeZoneOffsetInMillis()
//package com.java2s; import java.util.Calendar; public class Main { /**/*w ww . j a v a2s . c om*/ * @return the timezone offset of the current device relative to UTC */ static long getTimeZoneOffsetInMillis() { Calendar cal = Calendar.getInstance(); return cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET); } }