Skip Menu |
 
Update: The rt.cpan.org bug tracker service is no longer shutting down.

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 133621
Status: new
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: KES [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: InflateColumn::DateTime does not setup formatter
Download (untitled) / with headers
text/plain 1.3k
Hi. According to description: This module figures out the type of DateTime::Format::* The date is inflated OK, but when formatting DateTime we lose info: ``` Show quoted text
DBG> $DB::z->ctime
DateTime 2019-04-16T14:42:51 Show quoted text
DBG> $DB::z
HyperMouse::Schema::Result::Order { _column_data => { agreement_id => 1549, app_period => [-infinity,"2020-03-01 00:00:00+02"), billed_to => 2020-03-01 00:00:00+02, comment => этот, ctime => 2019-04-16 14:42:51.27893+03, docdate => 2016-04-01, docn => 201322, domain_uuid => undef, id => 10779, package_id => 185, period_id => 10, service_level_id => 1, suma => 0.000000000000000000, vm_id => undef, }, _in_storage => 1, _inflated_column => { ctime => DateTime 2019-04-16T14:42:51, }, _result_source => IGNORED, } Show quoted text
DBG> $DB::z->ctime->{ tz }
DateTime::TimeZone::OffsetOnly { name => +0300, offset => 10800, } ``` Here we can see that DateTime is with timezone, but it is not displayed. Looking into object for formater we see lack of it: ``` Show quoted text
DBG> $DB::z->ctime->formatter
undef ``` Adding formater explicitly we get expected results: ``` Show quoted text
DBG> $DB::z->ctime->set_formatter( 'DateTime::Format::Pg' )
DateTime 2019-04-16 14:42:51.278930000+0300 ``` Can you please auto add DateTime::Format::* formatter while object inflation. Thank you.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.