TimeZone.getOffset(long date) has the following syntax.
public int getOffset(long date)
In the following code shows how to use TimeZone.getOffset(long date) method.
// ww w.ja v a 2 s . c o m import java.util.Calendar; import java.util.TimeZone; public class Main { public static void main( String args[] ){ TimeZone timezone = TimeZone.getTimeZone("Europe/Paris"); // checking offset value for date System.out.println("Offset value:" + timezone.getOffset(Calendar.ZONE_OFFSET)); } }
The code above generates the following result.