]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_blocks_controller.rb
Bump osm-community-index from 5.5.5 to 5.6.0
[rails.git] / app / controllers / user_blocks_controller.rb
index 63fca655750830184e5a0d221326b050426e5fce..63ebdad713b85f5b54785c5d8169a611f89d57dc 100644 (file)
@@ -32,7 +32,7 @@ class UserBlocksController < ApplicationController
   end
 
   def edit
-    params[:user_block_period] = ((@user_block.ends_at - Time.now.getutc) / 1.hour).ceil.to_s
+    params[:user_block_period] = ((@user_block.ends_at - Time.now.utc) / 1.hour).ceil.to_s
   end
 
   def create
@@ -41,7 +41,7 @@ class UserBlocksController < ApplicationController
         :user => @user,
         :creator => current_user,
         :reason => params[:user_block][:reason],
-        :ends_at => Time.now.getutc + @block_period.hours,
+        :ends_at => Time.now.utc + @block_period.hours,
         :needs_view => params[:user_block][:needs_view]
       )
 
@@ -62,7 +62,7 @@ class UserBlocksController < ApplicationController
         flash[:error] = t(".only_creator_can_edit")
         redirect_to :action => "edit"
       elsif @user_block.update(
-        :ends_at => Time.now.getutc + @block_period.hours,
+        :ends_at => Time.now.utc + @block_period.hours,
         :reason => params[:user_block][:reason],
         :needs_view => params[:user_block][:needs_view]
       )