I have set my time as US Locale.I have made database in Sqlite.In database i have fields like Entry_Date which set as CURRENT_TIMESTAMP..Now i run query like
SELECT time('now')
o/p: 06:22:09
It display wrong time.so my que开发者_如何学运维stion is How do i set the Sqlite time?
You need to pass the localtime
modifier to the time
function.
sqlite> select time('now','localtime');
06:38:51
See Date and Time Functions
Update: For the record, here's how to output a unix epoch date:
sqlite> select time(1316638370,'unixepoch','localtime');
06:52:50
精彩评论