View Javadoc

1   /*
2    *  Copyright 2001-2005 Stephen Colebourne
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
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      public String getDisplayName(boolean daylight, int style, Locale locale) {
37          return "!!!";
38      }
39  
40      public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) {
41          return 0;
42      }
43      public void setRawOffset(int offsetMillis) {
44      }
45      public int getRawOffset() {
46          return 0;
47      }
48      public boolean useDaylightTime() {
49          return false;
50      }
51      public boolean inDaylightTime(Date date) {
52          return false;
53      }
54      
55  }