On May 3, 2010, at 3:16 AM, Pierre-Etienne DELON wrote:
> SELECT value FROM `data` WHERE stamp>='2010-04-26 07:00:00' AND
> stamp<'2010-04-27 07:00:00'
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++ ?
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.