01: /*
02: * Copyright 2001-2005 Stephen Colebourne
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.joda.time.convert;
17:
18: import java.util.Date;
19: import java.util.Locale;
20: import java.util.TimeZone;
21:
22: /**
23: * A basic mock testing class for an unknown time zone.
24: *
25: * @author Stephen Colebourne
26: */
27: class MockUnknownTimeZone extends TimeZone {
28:
29: MockUnknownTimeZone() {
30: super ();
31: }
32:
33: public String getID() {
34: return "!!!";
35: }
36:
37: public String getDisplayName(boolean daylight, int style,
38: Locale locale) {
39: return "!!!";
40: }
41:
42: public int getOffset(int era, int year, int month, int day,
43: int dayOfWeek, int milliseconds) {
44: return 0;
45: }
46:
47: public void setRawOffset(int offsetMillis) {
48: }
49:
50: public int getRawOffset() {
51: return 0;
52: }
53:
54: public boolean useDaylightTime() {
55: return false;
56: }
57:
58: public boolean inDaylightTime(Date date) {
59: return false;
60: }
61:
62: }
|