You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting 20.1.0 of GraalVM, all timezones are included by default[1] in the native image. However, the ids returned by the timezone don't seem to be correct for many of the timezones. The returned id for such incorrect timezones is all GMT. Consider this very trivial code:
import java.util.*;
public class TimeZoneTest {
public static void main(final String[] args) throws Exception {
final String[] ids = TimeZone.getAvailableIDs();
for (final String id : ids) {
final TimeZone tz = TimeZone.getTimeZone(id);
System.out.println("Timezone for " + id + " returned id " + tz.getID());
}
}
}
All it does is iterates over the available timezones, get the timezone by id and then prints the id by which it was retrieved and also the id returned by the TimeZone.getID(). This all returns the expected values in regular JVM execution. However, when built as native-image:
native-image --no-server TimeZoneTest
and then the native image run, it returns incorrect values for many (not all) timezones. Here are some which show incorrect values:
....
Timezone for ACT returned id GMT
Timezone for AET returned id GMT
Timezone for AGT returned id GMT
Timezone for ART returned id GMT
Timezone for AST returned id GMT
Timezone for BET returned id GMT
Timezone for BST returned id GMT
Timezone for CAT returned id GMT
Timezone for CNT returned id GMT
Timezone for CST returned id GMT
Timezone for CTT returned id GMT
Timezone for EAT returned id GMT
Timezone for ECT returned id GMT
Timezone for IET returned id GMT
Timezone for IST returned id GMT
Timezone for JST returned id GMT
Timezone for MIT returned id GMT
Timezone for NET returned id GMT
Timezone for NST returned id GMT
Timezone for PLT returned id GMT
Timezone for PNT returned id GMT
Timezone for PRT returned id GMT
Timezone for PST returned id GMT
Timezone for SST returned id GMT
Timezone for VST returned id GMT
I could reproduce this against 20.1.0 as well as latest upstream Graal VM repo (I'm on 6f531e72d68a398fe2a813b710e8e2ff9f45b719 commit). This was first reported by a Quarkus user here quarkusio/quarkus#10501 (comment)
Starting 20.1.0 of GraalVM, all timezones are included by default[1] in the native image. However, the ids returned by the timezone don't seem to be correct for many of the timezones. The returned id for such incorrect timezones is all
GMT
. Consider this very trivial code:All it does is iterates over the available timezones, get the timezone by id and then prints the id by which it was retrieved and also the id returned by the
TimeZone.getID()
. This all returns the expected values in regular JVM execution. However, when built as native-image:and then the native image run, it returns incorrect values for many (not all) timezones. Here are some which show incorrect values:
I could reproduce this against 20.1.0 as well as latest upstream Graal VM repo (I'm on
6f531e72d68a398fe2a813b710e8e2ff9f45b719
commit). This was first reported by a Quarkus user here quarkusio/quarkus#10501 (comment)[1] #1833
The text was updated successfully, but these errors were encountered: