diff --git a/lib/unread/scopes.rb b/lib/unread/scopes.rb
index <HASH>..<HASH> 100644
--- a/lib/unread/scopes.rb
+++ b/lib/unread/scopes.rb
@@ -15,7 +15,7 @@ module Unread
                  where('read_marks.id IS NULL')
 
         if global_time_stamp = user.read_mark_global(self).try(:timestamp)
-          result = result.where("#{table_name}.#{readable_options[:on]} > '#{global_time_stamp.to_s(:db)}'")
+          result = result.where("#{table_name}.#{readable_options[:on]} > ?", global_time_stamp)
         end
 
         result
fix the time zone bug in readable unread_by scope