Skip to Content

java.sql.Time.toString() Problem

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.

Time_Error.PNG (10.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    May 26, 2014 at 12:21 PM

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

    Mahesh

    Add comment
    10|10000 characters needed characters exceeded

  • May 24, 2014 at 08:09 AM

    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


    systemtime.png (12.8 kB)
    Add comment
    10|10000 characters needed characters exceeded