Re: [sqlite] time is off
TiNo <[EMAIL PROTECTED]> wrote: > example: > > sqlite> select datetime('now'); > 2006-09-18 10:11:48 > sqlite> select datetime('now','utc'); > 2006-09-18 08:11:52 > sqlite> select datetime('now','localtime'); > 2006-09-18 12:11:58 > > > select datetime('now') shows utc time, Localtime shows my localtime, > but now,utc is off. It should be the same as datetime('now'). Why is this? The 'utc' modifier interprets the time to the left as localtime and converts it to UTC. Since in the example above, the time to the left was already in UTC, you are doing a double-conversion. -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] time is off
On 9/18/06, TiNo <[EMAIL PROTECTED]> wrote: example: sqlite> select datetime('now'); 2006-09-18 10:11:48 sqlite> select datetime('now','utc'); 2006-09-18 08:11:52 sqlite> select datetime('now','localtime'); 2006-09-18 12:11:58 select datetime('now') shows utc time, Localtime shows my localtime, but now,utc is off. It should be the same as datetime('now'). Why is this? Did you set your locale on your machine? It can't convert to localtime correctly without being set for the right time zone. - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] time is off
example: sqlite> select datetime('now'); 2006-09-18 10:11:48 sqlite> select datetime('now','utc'); 2006-09-18 08:11:52 sqlite> select datetime('now','localtime'); 2006-09-18 12:11:58 select datetime('now') shows utc time, Localtime shows my localtime, but now,utc is off. It should be the same as datetime('now'). Why is this?