Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
seekinganswers
Post subject: java.sql.Time has zero time of 1am  PostPosted: Aug 01, 2007 - 02:30 PM



Joined: Aug 01, 2007
Posts: 1

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]
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject: RE: java.sql.Time has zero time of 1am  PostPosted: Aug 01, 2007 - 04:08 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits