I live in GMT-5 (America/Toronto).  Current time is 8:06am, which should be
13:06Z.  However, according to this:

select datetime('now','localtime'),datetime('now','utc');
datetime('now','localtime')    datetime('now','utc')
2011-12-20 08:05:24            2011-12-20 18:05:24

Its 18:05Z.  I started out putting blame on both my XP VM and SQLite Expert
Pro at work, but then coming home and running the same on my Win 7 machine,
both in SEP and sqlite3.exe (version 3.5 of the EXE) I get the same results.

When I set the time zone on the XP VM to GMT+0 the times match, UTC is
right on the money.  If I set GMT-1, I end up being two hours off.  The
local time is one hour closer to my time local time, but the UTC time
shouldn't change!

One thing I JUST tried now is the following:

select datetime('now','localtime'),datetime('now','localtime','utc');
datetime('now','localtime')    datetime('now','localtime','utc')
2011-12-20 08:10:43            2011-12-20 13:10:43

But this doesn't make sense.  I want the localtime and UTC time in one
call, and I get the right time??  If anything localtime and UTC time
shouldn't be the same since localtime should calculate based on UTC time.

Can someone shed some logic on this for me please?
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to