I am inserting an entry into the sqlite database by the current_timestamp date. The idea ist, not to set the time manually. Now the fact is that my date in the database is 5.30 hours after insertion. Any ideas how to get around or fix this?
use:
CREATE TABLE table ( ... , yourColumnName DATETIME DEFAULT (DATETIME(CURRENT_TIMESTAMP, 'LOCALTIME')) , ... );
The timestamp returned by current_timestamp is in UTC.
current_timestamp
To convert it to the local current time zone, use the datetime function:
INSERT INTO MyTable(MyColumn) VALUES(datetime(CURRENT_TIMESTAMP, 'localtime'))