[Dbix-class] Re: DateTime objects passed to search() are not supported properly

Alexander Hartmaier alexander.hartmaier at t-systems.at
Thu Sep 20 10:56:30 GMT 2012


On 2012-09-20 12:22, Peter Rabbitson wrote:
> On Wed, Sep 19, 2012 at 07:06:19AM -0700, Bill Moseley wrote:
>> On Wed, Sep 19, 2012 at 3:36 AM, Peter Rabbitson <rabbit+dbic at rabbit.us>wrote:
>>
>>> It never had a method to format it correctly in *all* cases. It can format
>>> it correctly 95% of the time (this is not really fixable either, it's an
>>> architectural deficiency). Hence the warning and leaving it to the user to
>>> make sure they are getting what they expect.
>>>
>> Hi Peter,
>>
>> I guess what is confusing to me is if I can ask the storage object for the
>> datetime_parser and use that (as per the cookbook) then why wouldn't DBIC
>> be able to use that directly as well?
>>
>> Is the parser from the storage object the parser (formatter) that you are
>> saying might not get it right?
>>
>> If the format is that far off won't the database complain?  The problem
>> I've experienced is where the default format doesn't include the time zone
>> so the time ends up in the database server's timezone in error.
> Precisely. The problem is that we can not invoke the correct IC::DT
> deflation routine to respect possible time_zone settings. The formatter is
> fine for use only as that - a formatter. There is no practical way to tie
> the IC::DT metadata to your search criteria. There is no change in behavior
> - DBIC has always done the wrong thing (simply stringifying the DT object).
> What changed is that now you are getting a warning about it.
Oracle's Datetime datatype doesn't store a timezone information so you
need to make sure you always convert to the same, UTC in my case.
I don't get the problem at hand, because the InflateColumn components
specify a serializer, why can't it be called on the object?
In case the serializer needs to know metadata about the column like the
timezone in case of a DataTime?
Why not enable the serializer to access the the column_info?

>
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk



*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*



More information about the DBIx-Class mailing list