Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

2 Hour time difference when saved to UL database???

4 posts in General Discussion Last posting was on 2005-04-04 13:06:37.0Z
Jan Posted on 2005-04-01 08:56:36.0Z
From: "Jan" <jan@cyberprop.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: 2 Hour time difference when saved to UL database???
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: rrba-146-99-232.telkomadsl.co.za
X-Original-NNTP-Posting-Host: rrba-146-99-232.telkomadsl.co.za
Message-ID: <424d0cc4@forums-1-dub>
Date: 1 Apr 2005 00:56:36 -0800
X-Trace: forums-1-dub 1112345796 165.146.99.232 (1 Apr 2005 00:56:36 -0800)
X-Original-Trace: 1 Apr 2005 00:56:36 -0800, rrba-146-99-232.telkomadsl.co.za
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:352
Article PK: 17656

Hi there,

I get an incorrect value inserted from the DateTime picker pod, into my
Ultralite database.

I read the value from the DateTime picker - and it's fine - it's the correct
date and time. I can alert() the value as follows:
alert('Setting the lastmod value to : ' +
document.getElementById('dtpblank').getDateTime());

This gives me the correct value.

BUT

When I look in the database, after I've saved the record, the time is
exactly 2 hours behind...

My save statement looks as follows:
updatePropStmt = ULConn.prepareStatement(updatePropStmtString,null);
updatePropStmt.setDateParameter(1,document.getElementById('dtpblank').getDateTime());
updatePropStmt.executeStatement();

updatePropStmtString is a string that looks something like this:
var updatePropStmtString = "update property set lastmod=? where
trim(pnum)='"+pNum+"'";

What is causing this?

Thanks!
Jan


tony pigram Posted on 2005-04-04 09:54:02.0Z
Reply-To: "tony pigram" <tony.pigram@nospam.com>
From: "tony pigram" <tony.pigram@nospam.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
References: <424d0cc4@forums-1-dub>
Subject: Re: 2 Hour time difference when saved to UL database???
Lines: 54
Organization: iAnywhere Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
X-Original-NNTP-Posting-Host: 158.76.110.128
Message-ID: <425100a6$1@forums-2-dub>
X-Original-Trace: 4 Apr 2005 01:53:58 -0800, 158.76.110.128
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 4 Apr 2005 01:53:59 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 4 Apr 2005 01:54:02 -0800
X-Trace: forums-1-dub 1112604842 10.22.108.75 (4 Apr 2005 01:54:02 -0800)
X-Original-Trace: 4 Apr 2005 01:54:02 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:356
Article PK: 8821

I have a feeling this is related to the UTC format of the dateTime?

instead of:
var currentDate = new Date();

document.getElementById("dbbind_"+detailpage.dbname+"_startDateTime").setDat
eTime(currentDate);

try:
var ts = new Date();
ts.setTime(ts.getTime()-ts.getTimezoneOffset()*60000);

hth?

tony

"Jan" <jan@cyberprop.com> wrote in message news:424d0cc4@forums-1-dub...
> Hi there,
>
> I get an incorrect value inserted from the DateTime picker pod, into my
> Ultralite database.
>
> I read the value from the DateTime picker - and it's fine - it's the
correct
> date and time. I can alert() the value as follows:
> alert('Setting the lastmod value to : ' +
> document.getElementById('dtpblank').getDateTime());
>
> This gives me the correct value.
>
> BUT
>
> When I look in the database, after I've saved the record, the time is
> exactly 2 hours behind...
>
> My save statement looks as follows:
> updatePropStmt = ULConn.prepareStatement(updatePropStmtString,null);
>

updatePropStmt.setDateParameter(1,document.getElementById('dtpblank').getDat
eTime());
> updatePropStmt.executeStatement();
>
> updatePropStmtString is a string that looks something like this:
> var updatePropStmtString = "update property set lastmod=? where
> trim(pnum)='"+pNum+"'";
>
> What is causing this?
>
> Thanks!
> Jan
>
>


Jan Posted on 2005-04-04 13:06:37.0Z
From: "Jan" <jan@cyberprop.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
References: <424d0cc4@forums-1-dub> <425100a6$1@forums-2-dub>
Subject: Re: 2 Hour time difference when saved to UL database???
Lines: 62
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: rrba-146-82-214.telkomadsl.co.za
Message-ID: <42512dc9$1@forums-2-dub>
X-Original-Trace: 4 Apr 2005 05:06:33 -0800, rrba-146-82-214.telkomadsl.co.za
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 4 Apr 2005 05:06:34 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 4 Apr 2005 05:06:37 -0800
X-Trace: forums-1-dub 1112616397 10.22.108.75 (4 Apr 2005 05:06:37 -0800)
X-Original-Trace: 4 Apr 2005 05:06:37 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:357
Article PK: 17660

Thanks - I'll try it and let you know!

"tony pigram" <tony.pigram@nospam.com> wrote in message
news:425100a6$1@forums-2-dub...
>I have a feeling this is related to the UTC format of the dateTime?
>
> instead of:
> var currentDate = new Date();
>
> document.getElementById("dbbind_"+detailpage.dbname+"_startDateTime").setDat
> eTime(currentDate);
>
> try:
> var ts = new Date();
> ts.setTime(ts.getTime()-ts.getTimezoneOffset()*60000);
>
> hth?
>
> tony
>
> "Jan" <jan@cyberprop.com> wrote in message news:424d0cc4@forums-1-dub...
>> Hi there,
>>
>> I get an incorrect value inserted from the DateTime picker pod, into my
>> Ultralite database.
>>
>> I read the value from the DateTime picker - and it's fine - it's the
> correct
>> date and time. I can alert() the value as follows:
>> alert('Setting the lastmod value to : ' +
>> document.getElementById('dtpblank').getDateTime());
>>
>> This gives me the correct value.
>>
>> BUT
>>
>> When I look in the database, after I've saved the record, the time is
>> exactly 2 hours behind...
>>
>> My save statement looks as follows:
>> updatePropStmt = ULConn.prepareStatement(updatePropStmtString,null);
>>
> updatePropStmt.setDateParameter(1,document.getElementById('dtpblank').getDat
> eTime());
>> updatePropStmt.executeStatement();
>>
>> updatePropStmtString is a string that looks something like this:
>> var updatePropStmtString = "update property set lastmod=? where
>> trim(pnum)='"+pNum+"'";
>>
>> What is causing this?
>>
>> Thanks!
>> Jan
>>
>>
>
>


Greg Fenton Posted on 2005-04-01 14:17:08.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla Thunderbird 1.6.3.2f (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: 2 Hour time difference when saved to UL database???
References: <424d0cc4@forums-1-dub>
In-Reply-To: <424d0cc4@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: gfenton-t30.sybase.com
Message-ID: <424d57e0$1@forums-2-dub>
X-Original-Trace: 1 Apr 2005 06:17:04 -0800, gfenton-t30.sybase.com
Lines: 24
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Apr 2005 06:17:05 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Apr 2005 06:17:08 -0800
X-Trace: forums-1-dub 1112365028 10.22.108.75 (1 Apr 2005 06:17:08 -0800)
X-Original-Trace: 1 Apr 2005 06:17:08 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:353
Article PK: 17658


Jan wrote:
>
> I get an incorrect value inserted from the DateTime picker pod, into my
> Ultralite database.
>

Jan,

This question would be better asked in the UltraLite newsgroup:

sybase.public.sqlanywhere.ultralite

Also, please post the version and build number of mBus and ASA/UltraLite
that you are using. For ASA/UL, use the command "dbeng9 -v" to get the
version/build string.

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/