Dominik Ohnezeit, on Sunday, November 24, 2019 03:21 PM, wrote...
> strftime('%s', '1970-01-01 00:00:00.000')
[clip]
> the date I get back is not 1970-01-01 00:00:00.000 but 1969-12-31
> 22:29:11.000
>
> Does anyone know why?
Here are some samples run...
sqlite> select strftime('%s', '1970-01-01 00:00:00.000');
0
sqlite> select strftime('%s', '1969-12-31 23:59:59');
-1
sqlite> select datetime(0, 'unixepoch');
1970-01-01 00:00:00
sqlite> select datetime(-1, 'unixepoch');
1969-12-31 23:59:59
You are probably subtracting 1 from 0 which is sending a -1 to datetime. Just
a thought... Thanks.
josé
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users