about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-25 15:21:22 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-25 15:21:22 +0100
commit4495baf4513cc4a07d077bf0081de686a3b7f985 (patch)
tree0ce95ea013cc4fb570bcd44ef6624ec34da4ea0d /app
parent898ab66e2e4233218415506f2ac9cb7f04399f5e (diff)
X-RateLimit-Reset formatted with iso8601
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb
index a3a2a3275..d2d3bc4a4 100644
--- a/app/controllers/api_controller.rb
+++ b/app/controllers/api_controller.rb
@@ -48,7 +48,7 @@ class ApiController < ApplicationController
 
     response.headers['X-RateLimit-Limit']     = match_data[:limit].to_s
     response.headers['X-RateLimit-Remaining'] = (match_data[:limit] - match_data[:count]).to_s
-    response.headers['X-RateLimit-Reset']     = (now + (match_data[:period] - now.to_i % match_data[:period])).to_s
+    response.headers['X-RateLimit-Reset']     = (now + (match_data[:period] - now.to_i % match_data[:period])).iso8601(6)
   end
 
   def set_pagination_headers(next_path = nil, prev_path = nil)