From: Paul D. <pa...@sn...> - 2003-05-30 12:48:54
|
At 12:13 +0200 5/30/03, Michael Neumann wrote: >Hi, > >What do you think? >For me it seems natural to use the local timezone instead of GMT. Stefano's right that datetime values in MySQL have no timezone information. But the time returned is in the *server's* local timezone. > >If there are no problems with existing applications, I'll make the >change and soon release a new version. > >Regards, > > Michael > >----- Forwarded message from Stefano Cobianchi <st...@to...> ----- > >From: Stefano Cobianchi <st...@to...> >To: ne...@s-... >Subject: Bug in Ruby::DBI? >Date: 19 May 2003 17:38:07 +0200 > >Hi > >I'm a Ruby developer and I use Ruby::DBI extensively in my work, >especially in conjunction with MySQL. >I thin I've found a bug in the code that converts a DATETIME sql >field in a DBI::Timestamp object: > > def as_timestamp(str) > return nil if str.nil? or str.empty? > ary = ParseDate.parsedate(str) > time = ::Time.gm(*(ary[0,6])) > >by calling ::Time.gm, you get an UTC time (in MySQL, "datetime" >fields have no information about the local timezone) >the right thing to do, I guess, is to call ::Time.local > > >-- >Stefano Cobianchi - st...@to... >Tomato Interactive - www.tomato.it > > >----- End forwarded message ----- > > > >------------------------------------------------------- >This SF.net email is sponsored by: eBay >Get office equipment for less on eBay! >http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 >_______________________________________________ >Ruby-dbi-devel mailing list >Rub...@li... >https://lists.sourceforge.net/lists/listinfo/ruby-dbi-devel |