Java Calendar DST_OFFSET

Syntax

Calendar.DST_OFFSET has the following syntax.

public static final int DST_OFFSET

Example

In the following code shows how to use Calendar.DST_OFFSET field.


import java.util.Calendar;
import java.util.GregorianCalendar;
/*from  ww w . ja  v  a 2  s . c om*/
public class Main {

  public static void main(String[] args) {

    Calendar cal = new GregorianCalendar();   
    System.out.println(cal.get(Calendar.DST_OFFSET));
    
    
  }
}

The code above generates the following result.