-
Notifications
You must be signed in to change notification settings - Fork 326
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
Date_Time_Spec test failure Zone offset not in valid range
#7655
Comments
This is happening for me only in the Python tests. |
I assume you have
Obviously when |
Full stack trace:
|
There is no enso stack trace. Full output: |
@GregoryTravis please try to "debug out" some more info. For example: Can you print out the enso$ git diff test
diff --git test/Tests/src/Data/Time/Date_Time_Spec.enso test/Tests/src/Data/Time/Date_Time_Spec.enso
index dc61e3b8e4..50daf3689c 100644
--- test/Tests/src/Data/Time/Date_Time_Spec.enso
+++ test/Tests/src/Data/Time/Date_Time_Spec.enso
@@ -108,6 +108,8 @@ spec_with name create_new_datetime parse_datetime nanoseconds_loss_in_precision=
Test.specify "should parse local time adding system zone" <|
time = parse_datetime "1970-01-01T00:00:01"
+ IO.println <| Objects.toString time
+ IO.println <| Objects.toString time.zone
time . year . should_equal 1970
time . month . should_equal 1
time . day . should_equal 1 |
|
I can reprodue the problem relatively easily: diff --git test/Tests/src/Data/Time/Date_Time_Spec.enso test/Tests/src/Data/Time/Date_Time_Spec.enso
index 613ff1b1d8..a9d0f24094 100644
--- test/Tests/src/Data/Time/Date_Time_Spec.enso
+++ test/Tests/src/Data/Time/Date_Time_Spec.enso
@@ -134,6 +134,16 @@ spec_with name create_new_datetime parse_datetime nanoseconds_loss_in_precision=
dt1.zone . zone_id . should_equal interop_tz.zone_id
dt1.to_display_text . should_equal "2020-01-01 01:00:00 +01:00"
+ Test.specify "epoch in New York" <|
+ tz = Time_Zone.parse "America/New_York"
+ time = create_new_datetime zone=tz 1970 1 1 0 0 1
+ time . hour . should_equal 0
+ time . minute . should_equal 0
+ time . second . should_equal 1
+ time . millisecond . should_equal 0
+ time . microsecond . should_equal 0
+ time . nanosecond . should_equal 0
+
Test.specify "should get time of day from offsed-based time" <|
time = parse_datetime "1970-01-01T00:00:01+01:00" . time_of_day
time . hour . should_equal 0 the problem however cannot be fixed on our side. It requires changes to GraalPy: submitted as https://github.com/oracle/graalpython/pull/360/files |
To be tested against the GraalVM fixes they have delivered. |
Fixed by some upgrade of GraalVM that brought in oracle/graalpython#360 |
Getting this error running
Date_Time_Spec
on develop:The text was updated successfully, but these errors were encountered: