Use Time#mktime_with_offset

This commit is contained in:
wildchild 2009-07-21 09:31:18 +06:00
parent f65d8bbbcc
commit e4ad16b77c
2 changed files with 12 additions and 6 deletions

View file

@ -138,10 +138,12 @@ module CouchRest
if value.is_a?(Hash)
typecast_hash_to_time(value)
else
Time.parse(value.to_s)
Time.mktime_with_offset(value.to_s)
end
rescue ArgumentError
value
rescue TypeError
value
end
# Creates a DateTime instance from a Hash with keys :year, :month, :day,