Permalink
Browse files

Merge branch 'master' of github.com:cohuman/sequel

  • Loading branch information...
2 parents 3bb7a73 + 8448fb0 commit dff190df67705fe35b19b387354bacdad7358217 @cohuman committed Nov 17, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/sequel/timezones.rb
@@ -85,7 +85,11 @@ def convert_timestamp(v, input_timezone)
# +application_timezone+. Used when coverting datetime/timestamp columns
# returned by the database.
def database_to_application_timestamp(v)
- convert_timestamp(v, Sequel.database_timezone)
+ if v.is_a? String && v.length >= 19
+ Time.utc(v[0,4], v[5,7], v[8,10], v[11,13], v[14,16], v[17,19])
+ else
+ convert_timestamp(v, Sequel.database_timezone)
+ end
end
# Sets the database, application, and typecasting timezones to the given timezone.

0 comments on commit dff190d

Please sign in to comment.