This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TimeZone


Mark Wielaard wrote:

Hi,

On Sun, 2004-08-22 at 22:14, Mark Wielaard wrote:

Thanks. Could you try something like the following to see if it gives
correct/reasonable time zone information?


Andreas tested and got a wrong timezone :{
After mailing a bit back and forth and talking on irc we found out that:

1) Darwin comes with tzdata files which miss the magic marker "TZif".
So TimeZone.readtzFile(String) now contains code to work around that.

2) That when using the native getDefaultTimeZoneId() backup code the
time zone id name was generated correctly (yeah!), but that there was a
small (but embarrassing) mistake in getDefaultTimeZone(String) that
didn't make sure that the offset was correct (as the new documentation
explained).

The attached patch contains both fixlets.


Tested again.

[wolfram:objdir/powerpc-apple-darwin7.5.0/libjava] andreast% gij TZ
java.util.SimpleTimeZone[id=CET,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]

This time it sems better :)

Thanks,

Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]