[Dbix-class] DBIx::Class::InflateColumn::DateTime for DB2

Hartmaier Alexander Alexander.Hartmaier at t-systems.at
Fri Jan 19 11:52:08 GMT 2007


Those are the sql statement I on_connect_do:
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS'
ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'
ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD HH24:MI:SS'
ALTER SESSION SET TIME_ZONE = 'CET'

I mainly use the data type date for my fields, I wanted to change them to timestamp but didn't because timestamp fields can't be used for partitioning atm.

Since the use of the perl DateTime modules I'm pretty happy with staying with date.

-Alex


> -----Original Message-----
> From: Nathan Gray [mailto:kolibrie at graystudios.org]
> Sent: Thursday, January 18, 2007 10:57 PM
> To: dbix-class at lists.rawmode.org
> Subject: Re: [Dbix-class] DBIx::Class::InflateColumn::DateTime for DB2
> 
> On Thu, Jan 18, 2007 at 04:20:44PM +0100, Hartmaier Alexander wrote:
> > What is the default date datatype format for Oracle?
> 
> It's pretty useless:
> 
>   DD-MON-RR
> 
> The timestamp default format is much better:
> 
>   DD-MON-RR HH.MI.SSXFF AM
> 
> or with timezone is:
> 
>   DD-MON-RR HH.MI.SSXFF AM TZR
> 
> but you have to make sure you 'alter session set time_zone' to a
> timezone name that both Oracle and DateTime understand (and not use
> offsets).  I remember it being a little tricky last time I looked at
> it.
> 
> > Luckily my chosen format is the same one MySQL uses, which is the
> default parse format for DBIC, so date de-/inflating works for me.
> 
> That works.
> 
> -kolibrie

*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
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