From: Michael N. <mne...@nt...> - 2003-05-30 10:13:27
|
Hi, What do you think? For me it seems natural to use the local timezone instead of GMT. If there are no problems with existing applications, I'll make the change and soon release a new version.=20 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 =3D ParseDate.parsedate(str) time =3D ::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 --=20 Stefano Cobianchi - st...@to... Tomato Interactive - www.tomato.it ----- End forwarded message ----- |