OSDN Git Service

shogi_server/floodgate.rb: Generating next time around the new year day by reading...
[shogi-server/shogi-server.git] / shogi_server / league / floodgate.rb
index f721d3a..b5478b9 100644 (file)
@@ -120,7 +120,7 @@ class League
             next if dow_index.nil?
             next unless (0..23).include?(hour)
             next unless (0..59).include?(minute)
             next if dow_index.nil?
             next unless (0..23).include?(hour)
             next unless (0..59).include?(minute)
-            time = DateTime::commercial(now.year, now.cweek, dow_index, hour, minute) rescue next
+            time = DateTime::commercial(now.cwyear, now.cweek, dow_index, hour, minute) rescue next
             time += 7 if time <= now 
             candidates << time
           end
             time += 7 if time <= now 
             candidates << time
           end