summaryrefslogtreecommitdiffstats
path: root/lib/SVG/Graph
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-22 07:46:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-22 07:46:52 +0000
commit3bde603029ef5e392db641dd39885baf50a2f966 (patch)
tree9baa2969d4b929559529e46b943122d679492198 /lib/SVG/Graph
parent838025372dc34096464cf19cdd39a1a587e4f176 (diff)
downloadredmine-3bde603029ef5e392db641dd39885baf50a2f966.tar.gz
redmine-3bde603029ef5e392db641dd39885baf50a2f966.zip
ParseDate missing in Ruby 1.9x (#11290).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10439 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/SVG/Graph')
-rw-r--r--lib/SVG/Graph/TimeSeries.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/SVG/Graph/TimeSeries.rb b/lib/SVG/Graph/TimeSeries.rb
index ee47359aa..bfa7c960c 100644
--- a/lib/SVG/Graph/TimeSeries.rb
+++ b/lib/SVG/Graph/TimeSeries.rb
@@ -1,5 +1,4 @@
require 'SVG/Graph/Plot'
-require 'parsedate'
module SVG
module Graph
@@ -157,8 +156,7 @@ module SVG
y = []
data[:data].each_index {|i|
if i%2 == 0
- arr = ParseDate.parsedate( data[:data][i] )
- t = Time.local( *arr[0,6].compact )
+ t = DateTime.parse( data[:data][i] ).to_time
x << t.to_i
else
y << data[:data][i]
@@ -173,8 +171,7 @@ module SVG
protected
def min_x_value=(value)
- arr = ParseDate.parsedate( value )
- @min_x_value = Time.local( *arr[0,6].compact ).to_i
+ @min_x_value = DateTime.parse( data[:data][i] ).to_time
end