From: Nikolai Weibull Date: 2004-01-29T02:50:56+09:00 Subject: Re: Why does DBI insist on using it's own date/time classes? * Ara.T.Howard [Jan, 28 2004 18:40]: > On Thu, 29 Jan 2004, David Heinemeier Hansson wrote: > > > Date: Thu, 29 Jan 2004 01:57:43 +0900 > > From: David Heinemeier Hansson > > Newsgroups: comp.lang.ruby > > Subject: Why does DBI insist on using it's own date/time classes? > > > > I can't seem to figure out why DBI uses its own set of date/time classes. > > They all seem to be pretty thin, incomplete wrappers around the existing > > classes. Why not just use the existing classes directly? It's pretty > > annoying that you have to cast to the proper class every time you deal with > > a row that uses dates and want to use methods like strftime. > > -- > > David Heinemeier Hansson, > > http://www.loudthinking.com/ -- Be mindful of the creep > > indeed, why not just use the existing classes directly and bypass dbi > altogether? because it's a bit of a problem to deal with classes like these. and a time can't be represented using ruby's Time class, only timestamps can. Ruby/libgda of the Ruby-GNOME2 project, however, deals well with these kinds of values, so if you require this and can consider loading GLib, then you should check it out, nikolai -- ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka ::: ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden ::: ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 ::: main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}