Postgres stores timestamps with timezones internally using UTC, however before displaying ActiveRecord will serialize/typecast to your application's timezone.
pry(main)>d = DateTime.now.in_time_zone("Asia/Kolkata") => Sat, 07 Oct 2017 00:38:26 IST +05:30
pry(main)> Booking.where('created_at > ?', d).count
(1.4ms) SELECT COUNT(*) FROM "bookings" WHERE (created_at > '2017-10-06 19:08:40.011480')
As you can see, d was converted to UTC to perform the search in the postgres database.
The created_at_before_type_cast method will return the value of created_at exactly how it's stored in the database without serializing/typecasting based on your ActiveRecord configuration.
As bkimble already pointed out: The numbers at the end are milliseconds.
You should have a look at the following for a deeper understanding: