Skip to content

Commit 56bd441

Browse files
authored
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 4bf1718 to fix ice-cube-ruby#483 solved the issue. This patch proposes that corresponding change to `/spec/examples/to_yaml_spec.rb`.
1 parent 10ae8dc commit 56bd441

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/examples/to_yaml_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module IceCube
7878
end
7979

8080
it "should be able to make a round-trip to YAML with .day_of_year" do
81-
schedule1 = Schedule.new(Time.now)
81+
schedule1 = Schedule.new(Time.zone.now)
8282
schedule1.add_recurrence_rule Rule.yearly.day_of_year(100, 200)
8383

8484
yaml_string = schedule1.to_yaml
@@ -112,7 +112,7 @@ module IceCube
112112
end
113113

114114
it "should be able to make a round-trip to YAML with .month_of_year" do
115-
schedule = Schedule.new(Time.now)
115+
schedule = Schedule.new(Time.zone.now)
116116
schedule.add_recurrence_rule Rule.yearly.month_of_year(:april, :may)
117117

118118
yaml_string = schedule.to_yaml

0 commit comments

Comments
 (0)