DBIx::Class::TimeStamp::WithTimeZone - DBIx::Class::TimeStamp extension that uses a specified timezone
A subclass of DBIx::Class::TimeStamp that uses a specified timezone instead of the floating timezone.
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.
To install DBIx::Class::TimeStamp::WithTimeZone, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::TimeStamp::WithTimeZone
CPAN shell
perl -MCPAN -e shell install DBIx::Class::TimeStamp::WithTimeZone
For more information on module installation, please visit the detailed CPAN module installation guide.