diff lib/SVG/Graph/TimeSeries.rb @ 1115:433d4f72a19b redmine-2.2

Update to Redmine SVN revision 11137 on 2.2-stable branch
author Chris Cannam
date Mon, 07 Jan 2013 12:01:42 +0000
parents 513646585e45
children 3e4c3460b6ca
line wrap: on
line diff
--- a/lib/SVG/Graph/TimeSeries.rb	Wed Jun 27 14:54:18 2012 +0100
+++ b/lib/SVG/Graph/TimeSeries.rb	Mon Jan 07 12:01:42 2013 +0000
@@ -1,5 +1,4 @@
 require 'SVG/Graph/Plot'
-require 'parsedate'
 
 module SVG
   module Graph
@@ -157,8 +156,7 @@
         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 @@
       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( value ).to_time
       end