[rt-devel] Timestamps
Hugues Lafarge
Hugues.Lafarge at afp.com
Mon Mar 13 05:42:58 EST 2000
>>>>> "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?
I don't know if that's what you're looking for, but take a look at
OO-DateTime (author: TOBIX, current: OO-DateTime-0.01.tar.gz).
--
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
mailing list