The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DBIx::Class::TimeStamp::WithTimeZone - DBIx::Class::TimeStamp extension that uses a specified timezone

DESCRIPTION

A subclass of DBIx::Class::TimeStamp that uses a specified timezone instead of the floating timezone.

SYNOPSIS

 package My::Schema;

 __PACKAGE__->load_components(qw( TimeStamp::WithTimezone ... Core ));

 __PACKAGE__->add_columns(
    id => { data_type => 'integer' },
    t_created => { data_type => 'datetime', set_on_create => 1 },
    t_updated => { data_type => 'datetime',
        set_on_create => 1, set_on_update => 1 },
 );

The timezone will be taken from the first environment variable defined:

* TZ

* TIMEZONE

It will default to 'GMT' otherwise.