Java Calendar ZONE_OFFSET

Syntax

Calendar.ZONE_OFFSET has the following syntax.

public static final int ZONE_OFFSET

Example

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


import java.util.Calendar;
import java.util.GregorianCalendar;
// ww  w. ja  v a  2  s  .co m
public class Main {

  public static void main(String[] args) {

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

The code above generates the following result.