class User include Mongoid::Document include Mongoid::Attributes::Dynamic include Mongoid::Timestamps::Created end User.where(created_at: Date.today.at_beginning_of_day..Date.today.end_of_day).to_a # => # MONGODB | 127.0.0.1:27017 | in_app_push_development.find | STARTED | {"find"=>"live_chats", "filter"=>{"visited_at"=>{"$gte"=>Mon, 24 May 2021 00:00:00 CST +08:00, "$lte"=>Mon, 24 May 2021 23:59:59 CST +08:00}}, "sort"=>{"_id"=>1}, "limit"=>1, "singleBatch"=>true, "lsid"=>{"id"=><BSON::Binary:0x2307063220 type=uuid data=0xb255e333ac134930...>}} User.where(dynamic_column: Date.today.at_beginning_of_day..Date.today.end_of_day).to_a # => # demo.find | STARTED | {"find"=>"users", "filter"=>{"dynamic_column"=>{"$gte"=>Mon, 24 May 2021 00:00:00 CST +08:00, "$lte"=>Mon, 24 May 2021 23:59:59 CST +08:00}}, "lsid"=>{"id"=><BSON::Binary:0x2293638920 type=uuid data=0xce4728f87e384555...>}}
I want dynamic_column also use UTC time