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.


-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
Sent from Madison, WI, United States
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to