sqlite> select datetime(1080701286,'unixepoch');
2004-03-31 02:48:06
sqlite> select datetime(1080701286,'localtime');
2954147-07-10 07:00:00
sqlite> select datetime(1080701286,'unixepoch','localtime');
2004-03-30 21:48:06
sqlite> select julianday('now');
2453095.66955468
sqlite> select datetime(2453095.66955468,'localtime');
2004-03-30 23:04:09

I think the problem is that unixepoch seconds are being used as Julian
Day Numbers, which they aren't.

e

Tuesday, March 30, 2004, 10:28:37 PM, you wrote:

> Kenneth Lo wrote:
>> I think the time() function is not reporting the correct time. The date part
> is OK. I also note that CVSTrac uses C codes to handle datetime i.e. not relying
> on sqlite. Is there a bug?
>> 
>> Some investigation ...
>> bash-2.05b$ date
>> Wed Mar 31 11:12:03 HKT 2004
>> bash-2.05b$ sqlite
>> SQLite version 2.8.12
>> Enter ".help" for instructions
>> sqlite> SELECT strftime('%s','now');
>> 1080701286
>> sqlite> select datetime(1080701286,'unixepoch');
>> 2004-03-31 02:48:06
>> sqlite> select datetime(1080701286,'localtime');
>> 2954147-07-10 19:59:59
>> sqlite> select datetime('now');
>> 2004-03-31 02:49:07


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to