1 package com.thoughtworks.xstream.testutil; 2 3 import junit.extensions.TestDecorator; 4 import junit.framework.Test; 5 import junit.framework.TestResult; 6 7 import java.util.TimeZone ; 8 9 public class TimeZoneChanger { 10 11 private static final TimeZone originalTimeZone = TimeZone.getDefault(); 12 13 public static void change(String timeZone) { 14 TimeZone.setDefault(TimeZone.getTimeZone(timeZone)); 15 } 16 17 public static void reset() { 18 TimeZone.setDefault(originalTimeZone); 19 } 20 21 } 22 | Popular Tags |