Browse files

Preserve offset when parsing times

Changing scaler_scanner's parse_time function to return a time object
with offset preserved if it was specified.
  • Loading branch information...
1 parent 5258fab commit 451f794d1fa77b8e96e0a2f37f7fdd04740bdfc5 @chrisperelstein committed Jan 16, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/psych/scalar_scanner.rb
View
2 lib/psych/scalar_scanner.rb
@@ -143,7 +143,7 @@ def parse_time string
offset += ((tz[1] || 0) * 60)
end
- klass.at((time - offset).to_i, us)
+ klass.new(yy, m, dd, hh, mm, ss+us/1000000, offset)
end
end
end

0 comments on commit 451f794

Please sign in to comment.