Use Time#mktime_with_offset
This commit is contained in:
parent
f65d8bbbcc
commit
e4ad16b77c
2 changed files with 12 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue