01: /*
02: * Copyright (C) 2005 Joe Walnes.
03: * Copyright (C) 2006, 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 15. January 2005 by Joe Walnes
11: */
12: package com.thoughtworks.xstream.testutil;
13:
14: import java.util.TimeZone;
15:
16: public class TimeZoneChanger {
17:
18: private static final TimeZone originalTimeZone = TimeZone
19: .getDefault();
20:
21: public static void change(String timeZone) {
22: TimeZone.setDefault(TimeZone.getTimeZone(timeZone));
23: }
24:
25: public static void reset() {
26: TimeZone.setDefault(originalTimeZone);
27: }
28:
29: }
|