[Dbix-class] ANNOUNCE: Datetime::Format::Oracle

Hartmaier Alexander Alexander.Hartmaier at t-systems.at
Mon Nov 6 15:55:50 GMT 2006


Great!
At the moment I use Datetime::Format::MySQL because my 'ALTER SESSION' statements in on_connect_do set the date format to exactly the same which D::F::MySQL uses.

-Alex


> -----Original Message-----
> From: Nathan Gray [mailto:kolibrie at graystudios.org]
> Sent: Monday, November 06, 2006 3:24 PM
> To: dbix-class at lists.rawmode.org
> Subject: [Dbix-class] ANNOUNCE: Datetime::Format::Oracle
> 
> Oracle's date datatype is supported via parse_date, format_date,
> parse_datetime, format_datetime.
> 
> I plan to add 'timestamp' and 'timestamp with time zone' methods after
> I install 9i client libraries on my computer.
> 
> I request that a datetime_parser_type method be added to
> DBIx::Class::Storage::DBI::Oracle:
> 
>   sub datetime_parser_type { return "DateTime::Format::Oracle"; }
> 
> I am concerned by the treatment of 'datetime' and 'timestamp' in
> DBIx::Class::InflateColumn::DateTime.
> 
> In Oracle, the 'date' datatype may contain time information, so is
> really a datetime datatype.  The 'timestamp' datatype in Oracle adds
> fractional seconds, and the 'timestamp with time zone' datatype adds
> time zone information.
> 
> My concern is that DBIx::Class::InflateColumn::DateTime uses the
> 'parse_datetime' and 'format_datetime' methods for 'timestamp'
> datatypes.  In Oracle, the format of each of the three time datatypes
> are controlled by separate formatting settings, so the formats may
> be different from each other.
> 
> I am also concerned that 'timestamp with time zone' datatypes are
> ignored by DBIx::Class::InflateColumn::DateTime.
> 
> I would like to see 'timestamp with time zone' run the
> parse_timestamp_with_time_zone and format_timestamp_with_time_zone
> methods, if they are available, and fall back to timestamp methods
> otherwise.
> 
> So 'timestamp with time zone' would attempt, in this order:
> 
>   parse_timestamp_with_time_zone
>   parse_timestamp
>   parse_datetime
> 
> and
> 
>   format_timestamp_with_time_zone
>   format_timestamp
>   format_datetime
> 
> A plain 'timestamp' datatype would attempt, in this order:
> 
>   parse_timestamp
>   parse_datetime
> 
> and
> 
>   format_timestamp
>   format_datetime
> 
> Oracle also has a 'timestamp with local time zone' datatype, which
> really is just a timestamp (and will not return nor accept time zone
> information).  It is special in that it uses the time zone of the
> session to calculate the date and time to return.  For this datatype,
> it seems the order of methods to try would be:
> 
>   parse_timestamp_with_local_time_zone
>   parse_timestamp
>   parse_datetime
> 
> If it is agreed that there should be a
> 'parse_timestamp_with_time_zone' in that list, I can support that.
> 
> In any case, Enjoy!
> 
> -kolibrie
> 
> 
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive: http://www.mail-archive.com/dbix-
> class at lists.rawmode.org/

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