| 114 | * @serial exclude |
| 115 | */ |
| 116 | public abstract class Timezone |
| 117 | implements Serializable { |
| 118 | |
| 119 | //~ Statische Felder/Initialisierungen -------------------------------- |
| 120 | |
| 121 | private static final String NEW_LINE = |
| 122 | System.getProperty("line.separator"); |
| 123 | private static final String REPOSITORY_VERSION = |
| 124 | System.getProperty("net.time4j.tz.repository.version"); |
| 125 | |
| 126 | private static final Comparator<TZID> ID_COMPARATOR = Comparator.comparing(TZID::canonical); |
| 127 | |
| 128 | /** |
| 129 | * <p>This standard strategy which is also used by the JDK-class |
| 130 | * {@code java.util.GregorianCalendar} subtracts the next defined |
| 131 | * offset from any local timestamp in order to calculate the global |
| 132 | * time while pushing forward an invalid local time. </p> |
| 133 | * |
| 134 | * <p>Equivalent to |
| 135 | * {@code GapResolver.PUSH_FORWARD.and(OverlapResolver.LATER_OFFSET)}. </p> |
| 136 | * |
| 137 | * @see #getOffset(GregorianDate,WallTime) |
| 138 | */ |
| 139 | /*[deutsch] |
| 140 | * <p>Diese auch von der JDK-Klasse {@code java.util.GregorianCalendar} |
| 141 | * verwendete Standardstrategie zieht von einem beliebigen lokalen |
| 142 | * Zeitstempel den jeweils nächstdefinierten Offset ab, um die |
| 143 | * globale Zeit zu erhalten, wobei eine ungültige lokale Zeit |
| 144 | * um die Länge einer Offset-Verschiebung vorgeschoben wird. </p> |
| 145 | * |
| 146 | * <p>Äquivalent zu: |
| 147 | * {@code GapResolver.PUSH_FORWARD.and(OverlapResolver.LATER_OFFSET)}. </p> |
| 148 | * |
| 149 | * @see #getOffset(GregorianDate,WallTime) |
| 150 | */ |
| 151 | public static final TransitionStrategy DEFAULT_CONFLICT_STRATEGY = |
| 152 | GapResolver.PUSH_FORWARD.and(OverlapResolver.LATER_OFFSET); |
| 153 | |
| 154 | /** |
| 155 | * <p>In addition to the {@link #DEFAULT_CONFLICT_STRATEGY |
| 156 | * standard strategy}, this strategy ensures the use of valid local |
| 157 | * timestamps. </p> |
| 158 | * |
| 159 | * <p>Equivalent to |
| 160 | * {@code GapResolver.ABORT.and(OverlapResolver.LATER_OFFSET)}. </p> |
| 161 | */ |
| 162 | /*[deutsch] |
| 163 | * <p>Legt bei Transformationen von lokalen Zeitstempeln zu UTC fest, |
| 164 | * daß nur in der Zeitzone gültige Zeitstempel zugelassen |
| 165 | * werden. </p> |
| 166 | * |
| 167 | * <p>Ansonsten wird die {@link #DEFAULT_CONFLICT_STRATEGY |
| 168 | * Standardstrategie} verwendet. Äquivalent zu: |
| 169 | * {@code GapResolver.ABORT.and(OverlapResolver.LATER_OFFSET)}. </p> |
| 170 | */ |
| 171 | public static final TransitionStrategy STRICT_MODE = |
| 172 | GapResolver.ABORT.and(OverlapResolver.LATER_OFFSET); |
| 173 |
nothing calls this directly
no test coverage detected