9 local $SIG{__WARN__} = sub { warn @_ if $_[0] !~ /extra \=\> .+? has been deprecated/ };
10 DBICTest::Schema->load_classes('EventTZPg');
13 eval { require DateTime::Format::Pg };
15 ? ( skip_all => 'Need DateTime::Format::Pg for timestamp inflation tests')
20 my $schema = DBICTest->init_schema();
23 my $event = $schema->resultset("EventTZPg")->find(1);
24 $event->update({created_on => '2009-01-15 17:00:00+00'});
25 $event->discard_changes;
26 isa_ok($event->created_on, "DateTime") or diag $event->created_on;
27 is($event->created_on->time_zone->name, "America/Chicago", "Timezone changed");
28 # Time zone difference -> -6hours
29 is($event->created_on->iso8601, "2009-01-15T11:00:00", "Time with TZ correct");