[Dbix-class] Re: Patch for DBIx::Class::InflateColumn::DateTime
Ash Berlin
ash_cpan at firemirror.com
Sun Oct 7 20:05:48 GMT 2007
Sergio Salvi wrote:
> On 9/19/07, Ash Berlin <ash at firemirror.com> wrote:
>> Sergio Salvi wrote:
>>> Hi Matt, Ash,
>>>
>>> I have a patch for DBIx::Class::InflateColumn::DateTime to add support
>>> for timezones. It allows one to specify that a DATE or DATETIME field
>>> is stored in a specific timezone instead of the default (UTC). It's
>>> here: http://scsys.co.uk:8001/9505
>> DateTime's come out in Floating, not UTC btw.
>>> I've checked out trunk, wrote tests and documentation. Could you
>>> please look at it and, hopefully, apply it?
>>>
>>> Thanks,
>>> Sergio
>> Looks like a promising start. Could you just make the following changes:
>>
>> - Move the TZ into the extra hash:
>>
>> starts_at => { data_type => 'datetime', extra => { timezone =>
>> "America/Chicago" } },
>>
>> - Make default convert from what ever timezone the incoming $obj is to
>> the one set in the column. Without this you can't guarantee that all
>> values of the column have the stated timezone.
>>
>>
>
> (copying the DBIC list now)
>
> Here is the updated patch according to your suggestions. I've added
> more tests also.
>
> Let me know what you and others think.
>
> Thanks,
> Sergio
>
>
Your patch doesn't seem to be a fully difference from the repository
version - it has differences for a file
t/lib/DBICTest/Schema/EventTZ.pm, but this does not exist yet.
Please regen the patch.
More information about the DBIx-Class
mailing list