Commit | Line | Data |
6c99a3ee |
1 | package DBICTest::Schema::EventTZPg; |
2 | |
3 | use strict; |
4 | use warnings; |
4a233f30 |
5 | |
6c99a3ee |
6 | use base qw/DBICTest::BaseResult/; |
7 | |
8 | __PACKAGE__->load_components(qw/InflateColumn::DateTime/); |
9 | |
10 | __PACKAGE__->table('event'); |
11 | |
12 | __PACKAGE__->add_columns( |
13 | id => { data_type => 'integer', is_auto_increment => 1 }, |
eef9b484 |
14 | starts_at => { data_type => 'datetime', time_zone => "America/Chicago", locale => 'de_DE' }, |
15 | created_on => { data_type => 'timestamp with time zone', time_zone => "America/Chicago" }, |
65b386df |
16 | ts_without_tz => { data_type => 'timestamp without time zone' }, |
6c99a3ee |
17 | ); |
18 | |
19 | __PACKAGE__->set_primary_key('id'); |
20 | |
21 | sub _datetime_parser { |
22 | require DateTime::Format::Pg; |
23 | DateTime::Format::Pg->new(); |
24 | } |
25 | |
49bceca3 |
26 | # this is for a reentrancy test, the duplication from above is intentional |
27 | __PACKAGE__->add_columns( |
28 | ts_without_tz => { data_type => 'timestamp without time zone', inflate_datetime => 1 }, |
29 | ); |
30 | |
6c99a3ee |
31 | 1; |