-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Europe/Amsterdam timezone is now broken due to error in tz update 2022c. #100
Comments
I can reproduce this. For now, I'll assume Correttos that produce 'correct' output:
'incorrect' output:
Something must have went into the most recent release of Corretto 17 and 19, that did not go into 8 and 11. I need to look further into this |
For clarification, the timezone data used in Corretto is the IANA timezone database. We either get that information through the OpenJDK repository, or we do an import ourselves. The specific change to the Specifically in this commit eggert/tz@0b925f6#diff-b11f203e8e6ce90d0ab5a01a37ac248669987afb2a50fe0224fa8b8c5c985a73 Update 2022b was released on August, so this is the first version of Corretto that includes them. |
@alvdavi ah, that link helps and clarifies things a lot.
No, this seems like an error in corretto. At least, if I understand the diff (0b925f6) you linked to. A quote from this post on the tz-announce list:
Not sure what the Evidently, to include support for pre-1970 tz effects, the way corretto copies this stuff over needs to be adjusted to take the backzone file into account. That, or corretto needs to announce this is a major breaking change that breaks many applications that store/interact with dates pre-1940. Which, for at least another decade or two, includes lots and lots of birthdates. I'll take the campaign over to the tz project if I have to, but they seem to have split things into two not so much to say 'everything before 1970 is irrelevant', but more: "if you can disregard everything before 1970, we have cleaned this thing up a lot, but if you do care, there's the backzone that you should include'. In that sense, it's corretto/openJDK that needs to decide whether it should include backzone or not, and I think the choice should obviously be: Yeah, include it. |
Hi, I apologize for my previous comment. You're right, the data for the Amsterdam zone was moved to one of the backzones, and although some discussion on the OpenJDK project was held here, the OpenJDK project does used the merged databases. We are currently investigation potential ways to move forward |
@alvdavi I'm learning as I read here, the links you posted earlier really filled in lots of missing pieces, and so does this link to the OpenJDK discussion. Joda "JSR310" Stephen himself is also on the case, and I can confirm that, yeah, ditching the backzone means all heck breaks loose for at least one of the countries he named: The Netherlands :) If there's anything I can do to help, let me know. In the mean time I'll keep on eye out on this issue + JDK-8293967 which is evidently related? The 'adopt 2022b' issue you linked to is also currently set as 'wontfix', which is weird, because the current state of the openjdk (at least, the git clone), here, is 2022e based (and therefore broken for e.g. The Netherlands pre-1970). |
The reason why the 2022b was marked as won't fix was because shortly after, 2022c was released and that version was imported directly, skipping the 2022b update (but with the 2022c import commit containing all the 2022b + 2022c changes) |
Need to make a correction. I've tried this again. All Correttos (8, 11, 17, 19) prior to the Q4 release produce correct output. All Correttos after the release produce the incorrect output. We need a path forward for all Corretto versions. We are going to discuss this issue with upstream maintainers. |
All Corretto 2022 Q4 release on 2022/10/18 (8.352.08.1, 11.0.17.8.1, 17.0.5.8.1, 19.0.1.10.1) include 2022b timezone updates. This update merges the Europe/Amsterdam timezone with Europe/Brussels, and breaks pre-1970 Netherlands dates. This in an intended change by the IANA Timezone Database. Older timezones are available as backzones The OpenJDK community discussed this issue in https://bugs.openjdk.org/browse/JDK-8292223, and ultimately decided to import timezone data without backzones. Corretto will continue to use timezone data without backzones to maintain compatibility with other OpenJDK distributions. The Corretto team will work with the community to address this issue for a future release. As a workaround, you can use the Timezone Updater Tool to have your JDK use 2022a tzdb and have correct data on the Netherlands. You can download the tzupdater jar from here. Example:
Note that you will miss updates for some countries such as Chile and Jordan. If this approach is not suitable, you will need to build a custom tzdb. Please reach out if you have further questions or concerns. |
Probably goes without saying, but just in case: Yes, running |
This is the last version with the correct tz info for Europe/Amsterdam:
corretto-17/make/data/tzdata/europe
Line 2215 in 9068185
The next commit basically says 'amsterdam is exactly like brussels'. Amongst other things, it changes the moment when Europe/Amsterdam joins the modern age, timewise, from the correct May 16th 1940, to the incorrect May 20th 1940. (It's correct for Brussels; it's not correct for Amsterdam. Nazi germany changing timezones on countries they occupied, and said countries not reverting to their pre-war state after being liberated, explains these dates).
I'm not familiar enough with the rules about timezone stuff to know if this is an error in corretto or an error in tzdata. However, the upshot is rather drastic. Code like this:
is broken for any date before may 20th (not just between may 16th and may 20th 1940). At least, it's clearly wrong in that range, and before that range, it's inconsistent with prior versions. I can run this code:
And when I upgrade/downgrade between Corretto v17.0.4.9-1 and Corretto v17.0.5.8-1, this prints different numbers, without changing the TZ at all (it's set to Europe/Amsterdam on this machine, with the RTC on UTC, on ubuntu running on ec2).
I believe v17.0.4.9-1 gives the right answer, and v17.0.5.8-1 gives the wrong answer.
This has far reaching deleterious effects: for example, DATE columns in h2 now report the wrong date (off by a day) for any date prior to may 20th, 1940. Evidently because h2 stores millis and not y/m/d for some reason. Any code anywhere that flips between DMY and milli-based storage mechanisms will flat out break for anything prior to may 20th 1940, even when consistently applying the Europe/Amsterdam timezone.
Please advise if the tzdata in corretto is just copied from elsewhere, and that therefore I should be filing this bug elsewhere.
In the mean time, for all affected: Downgrading is the only way I can fix this, if you want e.g. h2 databases to not be unfixably broken if they are storing dates prior to May 20th 1940 and your server is setup in Europe/Amsterdam zone.
The text was updated successfully, but these errors were encountered: