> I have verified my locale and default time zone in the same program.The
> values are correct and it is not UTC timezone. Any help appreciated.

How did you do that? What OS are you running it on?
Can you extract the code accessing SQLite database from your program
and create a mini-program that does nothing else except executes this
query? Run this mini-program, see what it returns. Then from the same
shell prompt run sqlite3 command line utility and execute this query
there, see if results are different. If they are show us full text of
java mini-program, we will try to find the problem.


Pavel


On Thu, Jun 2, 2011 at 10:57 AM, Sridhar Polavarapu
<sridhar.polavar...@idc-rimage.com> wrote:
> I have verified my locale and default time zone in the same program.The
> values are correct and it is not UTC timezone. Any help appreciated.
>
> Sridhar
>
> On 02-06-2011 19:34, Sridhar Polavarapu wrote:
>>
>> The returned value is displayed to the user. We are not storing back the
>> returned column.
>>
>> Sridhar
>>
>> On 02-06-2011 19:28, Pavel Ivanov wrote:
>>>>
>>>> but is returning the value stored in the database when executed
>>>> as a part of a java program. Can  anyone help me if I am missing
>>>> something here ?
>>>
>>> Looks like your java program runs with a different locale than SQLite
>>> Manager. I'm not sure why it thinks that you are in a UTC timezone.
>>> Maybe there's something in starting scripts or in initialization code
>>> of this program?
>>>
>>>
>>> Pavel
>>>
>>>
>>> On Thu, Jun 2, 2011 at 7:32 AM, Sridhar Polavarapu
>>> <sridhar.polavar...@idc-rimage.com>  wrote:
>>>>
>>>> Hi
>>>>
>>>> I am preparing a string sql query as follows
>>>>
>>>>     String jobQuery = "SELECT j.jobId, c.channelName ,
>>>> datetime(j.jobCreateDate,'localtime') as jobCreateDate, j.jobStatus,
>>>> CASE WHEN j.jobQuality='md' THEN 'Medium' WHEN j.jobQuality='hi' THEN
>>>> 'High' WHEN j.jobQuality='lo' THEN 'Low' ELSE 'Unspecified' END AS
>>>>       jobQuality, j.jobCompleteDate ";
>>>>         jobQuery += "FROM Job j ";
>>>>         jobQuery += "JOIN Channel c ON c.channelId = j.jobChannelId ";
>>>>
>>>> this query gives me jobCreateDate in my localtime when run in sqlite
>>>> manager, but is returning the value stored in the database when executed
>>>> as a part of a java program. Can  anyone help me if I am missing
>>>> something here ?
>>>>
>>>> Sridhar
>>>> _______________________________________________
>>>> sqlite-users mailing list
>>>> sqlite-users@sqlite.org
>>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>
>>
>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to