->on_connect_do("ALTER SESSION SET NLS_SORT = 'BINARY_CI'");
->on_connect_do("ALTER SESSION SET NLS_SORT = 'GERMAN_CI'");
+=item .. format a DateTime object for searching?
+
+L<search|DBIx::Class::ResultSet/search> and L<find|DBIx::Class::ResultSet/find>
+do not take L<DBIx::Class::InflateColumn> into account, and so your C<DateTime>
+object will not be correctly deflated into a format your RDBMS expects.
+
+The L<datetime_parser|DBIx::Class::Storage::DBI/datetime_parser> method on your
+storage object can be used to return the object that would normally do this, so
+it's easy to do it manually:
+
+ my $dtf = $schema->storage->datetime_parser;
+ my $rs = $schema->resultset('users')->search(
+ {
+ signup_date => {
+ -between => [
+ $dtf->format_datetime($dt_start),
+ $dtf->format_datetime($dt_end),
+ ],
+ }
+ },
+ );
+
+From a Row class, you can get this from the
+L<C<result_source>|DBIx::Class::Row/result_source>.
+
+ my $dtf = $self->result_source->storage->datetime_parser;
+
+This kludge is necessary only for conditions passed to
+L<DBIx::Class::ResultSet/search> and L<find|DBIx::Class::ResultSet/find>,
+whereas L<create|DBIx::Class::ResultSet/create>, L<DBIx::Class::Row/update> (but
+not L<DBIx::Class::ResultSet/update>) are L<DBIx::Class::InflateColumn>-aware
+and will do the right thing when supplied an inflated C<DateTime> object.
=back
) {
carp_unique 'DateTime objects passed to search() are not supported '
. 'properly (InflateColumn::DateTime formats and settings are not '
- . 'respected.) See "Formatting DateTime objects in queries" in '
- . 'DBIx::Class::Manual::Cookbook. To disable this warning for good '
+ . 'respected.) See ".. format a DateTime object for searching?" in '
+ . 'DBIx::Class::Manual::FAQ. To disable this warning for good '
. 'set $ENV{DBIC_DT_SEARCH_OK} to true'
}