[sqlite] problem with CURRENT_TIMESTAMP

2016-03-14 Thread Luca Ferrari
On Mon, Mar 14, 2016 at 12:02 PM, Clemens Ladisch wrote: > Then the obvious explanation is that there is a bug in your insertion > code. (Which you have not shown.) Shame on me, the insert was fine (null value against timestamp column) but later on an update of such column was issued as: UPDATE

[sqlite] problem with CURRENT_TIMESTAMP

2016-03-14 Thread Clemens Ladisch
Luca Ferrari wrote: > On Mon, Mar 14, 2016 at 10:52 AM, Richard Hipp wrote: >> I think your system clock was set incorrectly when you did the initial >> insert. > > I'm running on localhost and did not touch the clock. Then the obvious explanation is that there is a bug in your insertion code.

[sqlite] problem with CURRENT_TIMESTAMP

2016-03-14 Thread Luca Ferrari
On Mon, Mar 14, 2016 at 10:52 AM, Richard Hipp wrote: > I think your system clock was set incorrectly when you did the initial insert. I'm running on localhost and did not touch the clock. The following is the result of a just inserted row: SELECT strftime('%s', ts ), ts, strftime( '%s', CURREN

[sqlite] problem with CURRENT_TIMESTAMP

2016-03-14 Thread Luca Ferrari
Hi all, I suspect I've a wrong timezone, even if I cannot understand how and why. I've got atable with a column defined as follows: ts timestamp DEFAULT CURRENT_TIMESTAMP this should get default values in GMT. Now if I try to compare a row inserted a few minutes before (without the ts value, so

[sqlite] problem with CURRENT_TIMESTAMP

2016-03-14 Thread Richard Hipp
On 3/14/16, Luca Ferrari wrote: > Hi all, > I suspect I've a wrong timezone, even if I cannot understand how and why. > I've got atable with a column defined as follows: > > ts timestamp DEFAULT CURRENT_TIMESTAMP > > this should get default values in GMT. Now if I try to compare a row > inserted