Example usage for java.util SimpleTimeZone SimpleTimeZone

List of usage examples for java.util SimpleTimeZone SimpleTimeZone

Introduction

In this page you can find the example usage for java.util SimpleTimeZone SimpleTimeZone.

Prototype

public SimpleTimeZone(int rawOffset, String ID) 

Source Link

Document

Constructs a SimpleTimeZone with the given base time zone offset from GMT and time zone ID with no daylight saving time schedule.

Usage

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(820, "US");

    System.out.println(stobj.observesDaylightTime());
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(820, "US");

    // checking day light time  
    System.out.println("Use day light time : " + stobj.useDaylightTime());
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(820, "US");

    // get string value of time zone     
    System.out.println("String value is : " + stobj.toString());
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(720, "US");

    // check DST saving
    int dstsaving = stobj.getDSTSavings();
    System.out.println("DST saving : " + dstsaving);
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(720, "India");
    System.out.println("Origial obj: " + stobj);

    // clone the object
    Object cloneObj = stobj.clone();
    System.out.println("Clone obj: " + cloneObj);
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(720, "INDIA");

    // get raw offset
    int offset = stobj.getRawOffset();

    // check raw offset value       
    System.out.println("Raw Offset is : " + offset);
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(820, "US");

    // get hash code
    int hashcode = stobj.hashCode();

    // check hash code value       
    System.out.println("Hash code is : " + hashcode);
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(820, "GMT");

    // checking initial value     
    System.out.println("Initial raw offset: " + stobj.getRawOffset());

    // setting raw offset   
    stobj.setRawOffset(7200000);//  w w  w.  ja  va  2s .  c o m

    // checking the new value      
    System.out.println("Final raw offset value : " + stobj.getRawOffset());
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(820, "US");

    // checking initial value     
    System.out.println("Initial value: " + stobj);

    // setting start year   
    stobj.setStartYear(2008);//from   w w w.j  a va2s  .  co  m

    // checking the new value      
    System.out.println("Final value : " + stobj);
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(720, "US");

    // get offset
    int offset = stobj.getOffset(Calendar.ZONE_OFFSET);

    // check offset value       
    System.out.println("Offset is : " + offset);
}