Hi,
On Thu, Oct 8, 2009 at 12:04 AM, P Kishor <[email protected]> wrote: > On Wed, Oct 7, 2009 at 5:02 PM, Fredrik Karlsson <[email protected]> wrote: >> Dear list, >> >> I am sorry if I am asking a FAQ, but what is differnent with >> datetime() and time()? >> >>> date # This is the correct time on the system >> Ons 7 Okt 2009 23:56:36 CEST >>> sqlite3 temp.sqlite "SELECT datetime();" >> 2009-10-07 21:56:58 >>> sqlite3 temp.sqlite "SELECT datetime('now);" >> SQL error: unrecognized token: "'now);" >>> sqlite3 temp.sqlite "SELECT datetime('now');" >> 2009-10-07 21:57:13 >>> sqlite3 temp.sqlite "SELECT time('now');" >> 21:59:05 >> >> What happened here? How come the time functions are off 2 hours? >> (I am using sqlite version 3.5.9 on a Mac OS Leopard machine) >> > > > time zones. The sqlite returned times, by default, are UTC. > Yes, that would have been my guess too, but I am on CET, which I understand is UTC+1. So, I am still getting one hour less than I should from SQLite. Or, am I doing something stupid? /Fredrik "Life is like a trumpet - if you don't put anything into it, you don't get anything out of it." _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

