Trying to create a date in US/New_York timezone and convert it into Java fails. This was reported to Enso by our US based developer: https://github.com/enso-org/enso/issues/7655 - the final exception is:
Execution finished with an error: java.time.DateTimeException: Zone offset not in valid range: -18:00 to +18:00
at <java> java.base/java.time.ZoneOffset.ofTotalSeconds(ZoneOffset.java:417)
at <java> com.oracle.graal.python.builtins.objects.PythonAbstractObject.createZoneId(PythonAbstractObject.java:1001)
at <java> com.oracle.graal.python.builtins.objects.PythonAbstractObject.asTimeZone(PythonAbstractObject.java:949)
I have investigated the issue and I am providing a test to simulate the problem as well as a possible fix. the issue is that running:
e.g. the value of seconds field is bigger than allowed -18:00 and +18:00. My fix also reads value of days which is (in this case) -1 and compensates the value to fit into the desired range.
Trying to create a date in
US/New_York
timezone and convert it into Java fails. This was reported to Enso by our US based developer: https://github.com/enso-org/enso/issues/7655 - the final exception is:I have investigated the issue and I am providing a test to simulate the problem as well as a possible fix. the issue is that running:
yields
e.g. the value of seconds field is bigger than allowed -18:00 and +18:00. My fix also reads value of
days
which is (in this case)-1
and compensates the value to fit into the desired range.