[Dbix-class] InflateColumn::DateTime

Matt S Trout dbix-class at trout.me.uk
Thu Jun 8 13:59:19 CEST 2006


Mark Hedges wrote:
> On Wed, 7 Jun 2006 brian.cassidy at nald.ca wrote:
> 
>> From: brian.cassidy at nald.ca
>> To: dbix-class at lists.rawmode.org
>> Date: Wed, 07 Jun 2006 21:30:25 -0300
>> Subject: Re: [Dbix-class] InflateColumn::DateTime
>>
>> Hey Matt,
>>
>>> No it isn't, because it stops you being able to do date math on your DB.
>>>
>>> One of the intentions of this feature is that once it's fully supported 
>>> across all the databases we handle it'll make Epoch unnecessary. If the 
>>> ::Epoch author's about on this list, shout because I'd appreciate your 
>>> input here.
>> *shouts*
>>
>> My co-worker (Adam) and I wrote that component.  Basically, we 
>> agree that auto-inflation of actual date/datetime fields would 
>> be a better option. Though, there is likely a place for the 
>> component to exist for "legacy" schemas using epoch 
>> timestamps.
> 
> BTW MySQL's 'timestamp' field is actually YYYYMMDDhhmmss and 
> works exactly like 'datetime' with the DateTime subrefs I use 
> for inflate/deflate.

Yep, and we probably need to figure out what to do for "date" and "time" 
types as well. Proposals, anyone?

> Will there be a way to specify a DateTime::Format::* object to 
> set into the resulting DateTime objects from your built-in way?
> I make them stringify as MM/DD/YYYY hh:mm:ss.  Works nice.

Depends if anybody sketches me out an API and offers to write test 
cases, I expect (HINT HINT :)



More information about the Dbix-class mailing list