Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8024267

Stop using LMT for time-zones

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • tbd
    • 8
    • core-libs
    • 8

    Description

      LMT is the offset specified in the tzdb data for times before time-zones began. It is derived from the lat/lon of the city named in the the time-zone ID. It is measured to the nearest second, not minute, so often sticks out like a sore thumb in the data.

      The current TimeZone code does not use LMT. Joda-Time does, as does JSR-310. This is wrong.

      Recent discussion on the tzdb mailing list has indicated that the data is not properly maintained or reliably linked to the city of the zone ID. It is also relatively meaningless, being a notional value for a single city within a large region.

      Removing LMT is a good thing.

      The problem is what to replace it with. Options:

          throw errors for ZDT before time-zones began (not acceptable I think)
          calculate an LMT equivalent ourselves (so that it at least is accurate, even if still not useful)
          calculate an alternative

      My preference is to perform a calculation for each zone ID that evaluates the standard offset for the period 1970 to 2010, selecting the offset which is used for the longest period of time. This is simple and deterministic, and will produce results that make some sense.

      See JSR 310 issue #332; https://github.com/ThreeTen/threeten/issues/332

      Attachments

        Issue Links

          Activity

            People

              naoto Naoto Sato
              rriggs Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: