Are you using Active Record?
Try to configure Active Record with the following:
config.active_record.yaml_column_permitted_classes = [ ActiveSupport::TimeWithZone, ActiveSupport::TimeZone, Date, Symbol, Time, ]