cancel
Showing results for 
Search instead for 
Did you mean: 

java.sql.Time.toString() Problem

Former Member
0 Kudos

Hi all,

I'm having problems using java.sql.Time.toString():


I have an input field pointing to Time typed context attribute, getting it from and printing it on the screen as a message with the following lines of code:


Time t1 = wdContext.currentTimeElement().getTimeIn();

wdComponentAPI.getMessageManager().reportSuccess("Time: "+t1.toString());

The message shows the Time minus thirty minutes. I also print the TimeZone.getDefault() value and the app is showing this:

I'm on Caracas/Venezuela where we have GMT-4:30 Time Zone, the app is running on a server NW 7.3 SP10 with SAPJVM 6 build 6.1.065.

Does anyone knows what am I missing?

Regards,

Gregory.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Instead of toString() method .. .can you try DateFormatter class and then try printing the same.

Mahesh

Former Member
0 Kudos

Hi Mahesh,

Thanks for your answer, I've already try with date formatter and still not working.

My real application is taking the time from the input field and sending to an RFC call directly and the value is wrong.

Regards,

Gregory.

Former Member
0 Kudos

Hi Gregory,


Can you let me know what value do you exactly enter in the inputfield and how exactly is it printing using toString() again.


Thanks,

Mahesh

Former Member
0 Kudos

I've found and applied SAP Note # 1916213 and solve the problem.

Regards,

Gregory.

Former Member
0 Kudos

Thanks Gregory for sharing this information.

Mahesh

Answers (1)

Answers (1)

former_member191044
Active Contributor
0 Kudos

Hello Gregory,

maybe your servertime differs from your local time? Check it in the NWA.

(Sorry for german screenshot but i think you will get the point)

Regards

Tobias

Former Member
0 Kudos

Hi Tobias,

NWA is showing the correct time:

Thanks for your answer.

Regards,

Gregory.