Hugues.Lafarge at afp.com
Mon Mar 13 06:13:37 EST 2000
>>>>> "Hugues" == Hugues Lafarge <Hugues.Lafarge at afp.com> writes:
>>>>> "Tobias" == Tobias Brox <tobix at tobiasb.funcom.com> writes:
Tobias> How do we deal with the timestamps from the DB? I think it would make
Tobias> sense to abstract it to DBIx::Record to parse the timestamps from the
Tobias> DB and return timestamps as objects with different access methods. I
Tobias> think it would be nice using constructs like
Tobias> $self->Created->localtime, $self->Created->time,
Tobias> $self->Created->strftime(..) etc.
Tobias> There are two reasons for keeping them down at the DBIx::Record level;
Tobias> the output from the DB might be DBMS-specific (I've seen other DBMS'es
Tobias> printing it in ISO-format (readable) while Mysql prints it without any
Tobias> delimiters). The other reason is that parsing dates from a DB really
Tobias> isn't RT-specific.
Tobias> There is a myriad of packages at CPAN related to date and time parsing
Tobias> - but AFAIK most of them are function oriented, not object oriented
Tobias> (and I've even experienced that some of them are incompatible due to
Tobias> namespace conflicts). Does anybody know of an object oriented package
Tobias> which can be used?
Hugues> I don't know if that's what you're looking for, but take a look at
Hugues> OO-DateTime (author: TOBIX, current: OO-DateTime-0.01.tar.gz).
Oops, after taking a closer look, i realize that this is not a real
module, but just a container to expose what plans the author has in
Sorry for that.
Might be interesting anyway ...
Hugues Lafarge || Email: Hugues.Lafarge at afp.com
Agence France Presse || WWW: http://www.multimania.com/hlafarge
Ingenierie informatique || Phone: +33 1 40 41 77 15
4 rue de la bourse, 75002 Paris || Fax: +33 1 40 41 79 24
More information about the Rt-devel