diff --git a/test/Tests/src/Data/Time/Date_Time_Spec.enso b/test/Tests/src/Data/Time/Date_Time_Spec.enso index 0fecda22e05c..2a979223cfe5 100644 --- a/test/Tests/src/Data/Time/Date_Time_Spec.enso +++ b/test/Tests/src/Data/Time/Date_Time_Spec.enso @@ -53,7 +53,7 @@ spec_with name create_new_datetime parse_datetime nanoseconds_loss_in_precision= time.to_json.should_equal <| zone_pairs = [["zone", Time_Zone.utc]] time_pairs = [["year", time.year], ["month", time.month], ["day", time.day], ["hour", time.hour], ["minute", time.minute], ["second", time.second], ["nanosecond", time.nanosecond]] - Json.from_pairs ([["type", "Time"]] + time_pairs + zone_pairs) + Json.from_pairs ([["type", "Date_Time"]] + time_pairs + zone_pairs) Test.specify "should parse default time format" <| text = create_new_datetime 1970 (zone = Time_Zone.utc) . to_text @@ -380,10 +380,13 @@ spec_with name create_new_datetime parse_datetime nanoseconds_loss_in_precision= offset_1_h = ZoneOffset.ofTotalSeconds 3600 offset_2_h = ZoneOffset.ofTotalSeconds 2*3600 tz = Time_Zone.parse "Europe/Warsaw" - Test.specify "should find start/end of a Date_Period or Time_Period containing the current datetime correctly near the spring DST switch" <| + js_dst_pending = if name.contains "Javascript" then + "Javascript implementation does not support time zones correctly, so the tests for conversion around DST switches would fail and thus are disabled. We may revisit once JS gets better time support, see project Temporal: https://tc39.es/proposal-temporal/docs/ and our Pivotal issue tracking our integration: https://www.pivotaltracker.com/story/show/183261296" + Test.specify "should find start/end of a Date_Period or Time_Period containing the current datetime correctly near the spring DST switch" pending=js_dst_pending <| d1 = create_new_datetime 2022 3 27 1 34 15 0 tz d2 = create_new_datetime 2022 3 27 3 34 15 0 tz - (d1 + 1.hour) . should_equal d2 + d1_plus = d1 + 1.hour + d1_plus . should_equal d2 check_dates_spring date = date.start_of Time_Period.Day . should_equal (Date_Time.new 2022 3 27 0 0 0 0 tz)