Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-26 Thread 4eanlss
I would like to propose this version of winCurrentTime() which generates the same results as the current implementation but much simpler: int winCurrentTime(sqlite3_vfs *pVfs, double *prNow) { FILETIME ft; ULARGE_INTEGER ft64; #if SQLITE_OS_WINCE SYSTEMTIME time; GetSystemTime(&time); /*

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-26 Thread 4eanlss
Shane Harrelson writes: > I'd be worried that other 64 bit calculations are going wrong as well. > > Can you verify what type sqlite3_int64 is being set to in your environment? > > Also can you try the following (note the L suffix on the constants): > > static const sqlite3_int64 max32BitValue

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-26 Thread Shane Harrelson
On Fri, Feb 26, 2010 at 1:49 AM, 4eanlss <4ean...@engineer.com> wrote: > > Shane, > > I apologize for my quick snap response. > I have debugged the code and have identified what is happening. > The calculation in my environment results in 0 (zero) for this: > static const sqlite3_int64 max32BitVa

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-25 Thread 4eanlss
Shane Harrelson writes: > ... > I suspect that one of these "quirks" in your build environment is being > exposed by the code in winCurrentTime().Perhaps you could debug through > the code and find where the calculations are going wrong? In this way we > could provide more help. > Shane,

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-23 Thread Shane Harrelson
On Tue, Feb 23, 2010 at 1:56 AM, 4eanlss <4ean...@engineer.com> wrote: > Shane Harrelson writes: > > > > > I was unable to duplicate your error with the CLI and 3.6.22 (compiled > with > > cygwin\gcc or msvc): > Ok, so Borland not supported and windows API not followed. > Just as I expected from

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-23 Thread 4eanlss
Shane Harrelson writes: > > I was unable to duplicate your error with the CLI and 3.6.22 (compiled with > cygwin\gcc or msvc): Ok, so Borland not supported and windows API not followed. Just as I expected from open source software. ___ sqlite-user

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-05 Thread Shane Harrelson
I was unable to duplicate your error with the CLI and 3.6.22 (compiled with cygwin\gcc or msvc): SQLite version 3.6.22 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> SELECT datetime('now') as NOW; 2010-02-05 16:33:50 sqlite> SELECT datetime('now','utc') as UTC; 2

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-05 Thread Wilson, Ronald
> The 3 SQL statements executed in maintest.c are: > SELECT datetime('now') as NOW; > SELECT datetime('now','utc') as UTC; > SELECT datetime('now','localtime') as MST; > > Current local-time is 22:50 MST. > The results are: > NOW = 1601-01-01 00:04:49 > UTC = 1601-01-01 07:04:49 > MST = 1601-01-01

[sqlite] Bug Report: DateTime incorrect for Windows

2010-02-05 Thread 4eanlss
Hello, I'm compiling the 3.6.21 amalgamation with Borland command-line compiler version 5.2 for Windows XP. My compilation command is bcc32.exe -5 -H- -O2 -RT- -a8 -x- maintest.c sqlite3.c where maintest.c is similar to the http://www.sqlite.org/quickstart.html sample C code. The 3 SQL sta