joda-time
joda-time copied to clipboard
Create option for joda-time to ignore LMT like the JDK.
Please provide a option in joda-time, maybe a system property (-Djoda.ignoreLMT=true), to ignore the LMT information from the timezone database.
We are using joda-time in an complex enterprise environment and need to convert between joda and JDK timestamps. At the moment we have a patched joda-time version which ignores the LMT information from the timezone database like the JDK. It would be much easier if joda-time provides an option to behave exactly like the JDK (ignoreing the LMT).
Here you can see our patch. Its not working at runtime. It filters the LMT at compile time and you can't control at runtime it you want to disable or enable LMT:
Index: src/main/java/org/joda/time/tz/ZoneInfoCompiler.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/org/joda/time/tz/ZoneInfoCompiler.java (revision 1802)
+++ src/main/java/org/joda/time/tz/ZoneInfoCompiler.java (revision )
@@ -800,6 +800,9 @@
Map<String, RuleSet> ruleSets)
{
for (; zone != null; zone = zone.iNext) {
+ if ("LMT".equals(zone.iFormat)) {
+ continue;
+ }
builder.setStandardOffset(zone.iOffsetMillis);
if (zone.iRules == null) {
The JDK's behaviour is more complex than this. It eliminates changes prior to 1900, which is not the same as removing LMT.
Closing this, as the plan for Joda-Time is to depend directly on the JDK time-zone data