facebook

java.sql.Time has zero time of 1am

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #273392 Reply

    I am converting an application from another IDE (TogetherSoft) to run in MyEclipse and have found a difference in the way Time values are handled.

    If I create a java.sql.Time variable with zero millisecs I would have expected the time represented to be 00:00:00 which it was before, by in MyEclipse it is giving me 01:00:00

    i.e. the code:
    java.sql.Time = new Time(0);
    System.out.println(tim);

    gives output
    01:00:00

    This seems wrong to me. Is it something to do with my settings?
    My default timezone is:
    [id=Europe/London,offset=0,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]

    #273398 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    seeking,
    java.sql.Time’s behavior is controlled by the JRE or JDK you run your code with, not by the IDE. So it’s likely that you were working with an older JRE (1.3?) in TogetherSoft that had a different default behavior than in the newer JRE that ships with MyEclipse.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: java.sql.Time has zero time of 1am

You must be logged in to post in the forum log in