Using JVM time zone rules in Joda
I understand that this is not something that Joda can provide because Joda cannot depend on java.time. I'm writing this issue for two reasons:
- I would like comments from @jodastephen about the implementation, both from correctness and performance perspective.
- I understand that I'm not the first one that has wanted to do this. But I can't find any one who did this successfully. I would like my code be available to others.
https://gist.github.com/haozhun/f73e0c73a2dcc816c752d101b3513ce1
I understand that this is something more suitable for something like a mailing list than an issue. However, the only I can find is from SourceForge, which is likely obsolete.
I made some changes to the code I originally posted here. The only significant change is that all zones are initiated ahead of time (instead of using a cache). For my use case, the simplicity is worth it over the performance.
Updated code is here: https://github.com/airlift/joda-to-java-time-bridge
Your comment would be greatly appreciated.
This looks pretty good to me. In an ideal world, it would be nice to have a Java 8 version of Joda-Time that aids the transition to java.time.*, but it isn't easy to find the time.
I'll leave this open to aid others in finding the code.