diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-04-29 15:18:22 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-04-29 15:18:22 +0200 |
commit | f0354f9fd3c376636338f471bcbd0db1f7813ad8 (patch) | |
tree | a24148350e727bc80c5a5942b0da888997b352e1 /sonar-server/src/main | |
parent | 99d17c7988d86aabc3765e3a63b1f1720a9b816f (diff) | |
download | sonarqube-f0354f9fd3c376636338f471bcbd0db1f7813ad8.tar.gz sonarqube-f0354f9fd3c376636338f471bcbd0db1f7813ad8.zip |
deprecate methods parse_datetime and format_datetime of Api::ApiController
Diffstat (limited to 'sonar-server/src/main')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb index 709b7d103fe..594635c62a1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb @@ -77,16 +77,15 @@ class Api::ApiController < ApplicationController def render_success(msg) render_error(msg, 200) end - + + # deprecated. Use Api::Utils.format_datetime def format_datetime(datetime) - datetime.strftime("%Y-%m-%dT%H:%M:%S%z") + Api::Utils.format_datetime(datetime) end - + + # deprecated. Use Api::Utils.parse_datetime def parse_datetime(datetime_string, default_is_now=true) - if datetime_string.blank? - return (default_is_now ? Time.now : nil) - end - Time.parse(datetime_string) + Api::Utils.parse_datetime(datetime_string, default_is_now) end class ApiException < Exception |