Commit | Line | Data |
5608593e |
1 | package # hide from PAUSE |
2 | DBIx::Class::Storage::DBI::Sybase::DateTime; |
3 | |
4 | use strict; |
5 | use warnings; |
6 | use DateTime::Format::Strptime; |
7 | |
8 | my $inflate_format = DateTime::Format::Strptime->new( |
7e8cecc1 |
9 | pattern => '%Y-%m-%dT%H:%M:%S.%3NZ' |
5608593e |
10 | ); |
11 | |
12 | my $deflate_format = DateTime::Format::Strptime->new( |
7e8cecc1 |
13 | pattern => '%m/%d/%Y %H:%M:%S.%3N' |
5608593e |
14 | ); |
15 | |
16 | sub parse_datetime { shift; $inflate_format->parse_datetime(@_) } |
17 | |
18 | sub format_datetime { shift; $deflate_format->format_datetime(@_) } |
19 | |
20 | 1; |
7e8cecc1 |
21 | |
22 | =head1 NAME |
23 | |
24 | DBIx::Class::Storage::DBI::Sybase::DateTime - DateTime inflation/deflation |
25 | support for Sybase in L<DBIx::Class>. |
26 | |
27 | =head1 DESCRIPTION |
28 | |
29 | This needs to become L<DateTime::Format::Sybase>. |
30 | |
31 | =head1 AUTHORS |
32 | |
33 | See L<DBIx::Class/CONTRIBUTORS>. |
34 | |
35 | =head1 LICENSE |
36 | |
37 | You may distribute this code under the same terms as Perl itself. |
38 | |
39 | =cut |
40 | # vim:sts=2 sw=2: |