Hello,

I have noticed a problem in SQLite 3.20.1 for a simple operation based
on strftime('%s').

With SQLite 3.20.1 and 3.6.18

sqlite> select (strftime('%s', '2017-10-11 10:04:43') + 300) < 
strftime('%s', '2017-10-11 10:04:43');

1

If I use the CAST operator on the second member, it works

sqlite> select
(strftime('%s', '2017-10-11 10:04:43') + 300) <  CAST(strftime('%s',
'2017-10-11 10:04:43') as decimal);

0

If I use the following query, it works too:

sqlite> select
(strftime('%s', '2017-10-11 10:04:43') + 300 -  strftime('%s',
'2017-10-11 10:04:43')) < 0;

0

on SQlite 2.8, the operator < with strftime('%s') works.

Any idea if it is the expected behavior?

Thanks,

Best Regards,
Eric


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to