From 56bd44102138adc2a6153b10a37dc88ff1ae78fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Boutillier?= Date: Wed, 16 Nov 2022 22:33:50 +0100 Subject: [PATCH] Fix some failing round trips In some Debian environment two of the round trips in to_yaml_spec.rb were failing (those using `.month_of_year` and `day_of_year`. Applying the same fix as the one used in 4bf17183be02f8efe17b98c401af40db48a931dc to fix #483 solved the issue. This patch proposes that corresponding change to `/spec/examples/to_yaml_spec.rb`. --- spec/examples/to_yaml_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/examples/to_yaml_spec.rb b/spec/examples/to_yaml_spec.rb index e7c62c59..7166110d 100644 --- a/spec/examples/to_yaml_spec.rb +++ b/spec/examples/to_yaml_spec.rb @@ -78,7 +78,7 @@ module IceCube end it "should be able to make a round-trip to YAML with .day_of_year" do - schedule1 = Schedule.new(Time.now) + schedule1 = Schedule.new(Time.zone.now) schedule1.add_recurrence_rule Rule.yearly.day_of_year(100, 200) yaml_string = schedule1.to_yaml @@ -112,7 +112,7 @@ module IceCube end it "should be able to make a round-trip to YAML with .month_of_year" do - schedule = Schedule.new(Time.now) + schedule = Schedule.new(Time.zone.now) schedule.add_recurrence_rule Rule.yearly.month_of_year(:april, :may) yaml_string = schedule.to_yaml