From: Warren Young Date: May 3 2010 10:49am Subject: Re: DateTime issue List-Archive: http://lists.mysql.com/plusplus/8936 Message-Id: <292ABF6B-7F41-4D09-B2DA-40DAE9F9B921@etr-usa.com> MIME-Version: 1.0 (Apple Message framework v1078) Content-Type: multipart/alternative; boundary=Apple-Mail-1-371298759 --Apple-Mail-1-371298759 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On May 3, 2010, at 3:16 AM, Pierre-Etienne DELON wrote: > SELECT value FROM `data` WHERE stamp>=3D'2010-04-26 07:00:00' AND = stamp<'2010-04-27 07:00:00'=20 Please show the MySQL++ code that builds this query. > The results of this query are different with mysql++ and the MySQL = client console. I have a two hours shift that corresponds to the = diffenrence between UTC and local time (GMT+2). What is the problem ? = What should I do to get the right results with mysql++ ?=20 If you look at lib/datetime.cpp, you see that it either does no = translation at all, just accepts the y/m/d/h/m/s values you give it, or = it uses the C API localtime() (or similar) which should give the = translation your code wants. Unless, that is, you want it to assume UTC? I don't know how to do that = short of something ugly like changing the TZ environment variable. --Apple-Mail-1-371298759--