Java Code Examples for java.util.SimpleTimeZone#setRawOffset()
The following examples show how to use
java.util.SimpleTimeZone#setRawOffset() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleTimeZoneTest.java From j2objc with Apache License 2.0 | 5 votes |
/** * java.util.SimpleTimeZone#equals(java.lang.Object) */ public void test_equalsLjava_lang_Object() { // Test for method boolean // java.util.SimpleTimeZone.equals(java.lang.Object) TimeZone tz = TimeZone.getTimeZone("EST"); st1 = new SimpleTimeZone(tz.getRawOffset(), "EST"); st2 = new SimpleTimeZone(0, "EST"); assertFalse(st1.equals(st2)); st1.setRawOffset(st2.getRawOffset()); assertTrue(st1.equals(st2)); }
Example 2
Source File: SimpleTimeZoneTest.java From j2objc with Apache License 2.0 | 5 votes |
/** * java.util.SimpleTimeZone#setRawOffset(int) */ public void test_setRawOffsetI() { // Test for method void java.util.SimpleTimeZone.setRawOffset(int) st1 = new SimpleTimeZone(TimeZone.getTimeZone("EST").getRawOffset(), "EST"); int off = st1.getRawOffset(); st1.setRawOffset(1000); boolean val = st1.getRawOffset() == 1000; st1.setRawOffset(off); assertTrue("Incorrect offset set", val); }