X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FInterBase.pm;fp=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FInterBase.pm;h=cb6d8f9d67765c0ec7facea17f68e8bbcd1c93dc;hb=e5a62c46fad7960d70c8f7a825e7b10ff6ecf5c6;hp=5f5043bc94eb5359e42ba78064afe72bbcb362de;hpb=4f6eb3d8d3e8db9dfe002c90c65b856a0a79d60b;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/InterBase.pm b/lib/DBIx/Class/Storage/DBI/InterBase.pm index 5f5043b..cb6d8f9 100644 --- a/lib/DBIx/Class/Storage/DBI/InterBase.pm +++ b/lib/DBIx/Class/Storage/DBI/InterBase.pm @@ -30,10 +30,6 @@ L. =cut -__PACKAGE__->datetime_parser_type( - 'DBIx::Class::Storage::DBI::InterBase::DateTime::Format' -); - sub _ping { my $self = shift; @@ -135,55 +131,6 @@ sub connect_call_datetime_setup { $self->_get_dbh->{ib_time_all} = 'ISO'; } - -package # hide from PAUSE - DBIx::Class::Storage::DBI::InterBase::DateTime::Format; - -my $timestamp_format = '%Y-%m-%d %H:%M:%S.%4N'; # %F %T -my $date_format = '%Y-%m-%d'; - -my ($timestamp_parser, $date_parser); - -sub parse_datetime { - shift; - require DateTime::Format::Strptime; - $timestamp_parser ||= DateTime::Format::Strptime->new( - pattern => $timestamp_format, - on_error => 'croak', - ); - return $timestamp_parser->parse_datetime(shift); -} - -sub format_datetime { - shift; - require DateTime::Format::Strptime; - $timestamp_parser ||= DateTime::Format::Strptime->new( - pattern => $timestamp_format, - on_error => 'croak', - ); - return $timestamp_parser->format_datetime(shift); -} - -sub parse_date { - shift; - require DateTime::Format::Strptime; - $date_parser ||= DateTime::Format::Strptime->new( - pattern => $date_format, - on_error => 'croak', - ); - return $date_parser->parse_datetime(shift); -} - -sub format_date { - shift; - require DateTime::Format::Strptime; - $date_parser ||= DateTime::Format::Strptime->new( - pattern => $date_format, - on_error => 'croak', - ); - return $date_parser->format_datetime(shift); -} - 1; =head1 CAVEATS