Skip to content

Commit

Permalink
Preserve offset when parsing times
Browse files Browse the repository at this point in the history
Changing scaler_scanner's parse_time function to return a time object
with offset preserved if it was specified.
  • Loading branch information
chrisperelstein committed Jul 11, 2013
1 parent 5258fab commit 451f794
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/psych/scalar_scanner.rb
Expand Up @@ -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.