This is the mail archive of the java@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]

Re: date formatting


>>> Bryce McKinlay <bryce@waitaki.otago.ac.nz> 09-Jul-01 2:35:56 AM
>>>

   Calendar and (Simple)DateFormat in particular 
   are still quite buggy, and I have several fixes 
   (including one that makes it Y2K compliant, hehe)

I have a partial fix for parsing time zones (the current code does
not have a finished impl for any zzz parsing).

I'm not entirely sure about the fix though because I have to admit
that I don't really understand the SimpleTimeZone.

Partly my lack of understanding comes through arrogance, because I
live on the meridian I don't have to worry much about TZs 
(you may have celebrated the 4th last week, control our economy and
tell our prime minister what color shirt he should wear - but we're
still setting your clocks /8-)


The thing I most don't understand is how DSTs come into it all... the
code that exists in SimpleDateFormat and DateFormatSymbols makes it
look like Java is supposed to parse strings with DST timezones but how
is it supposed to know the time zone ids for DSTs?

PDT is not created as a static TimeZone (neither is my own DST: BST).
And SimpleTimeZone doesn't appear to have a system for handling
DST->base-TZs because it doesn't accept a DST id in any of it's
constructors.


Anyway, I have a fix that at least allows me to parse HTTP dates and
get the correct date so now Paperclips quite merrily sends 304s. 

Should I send it to the patches list?


   Unfortunately I'm constrained a bit when working
   on this Date stuff as I don't have a copy of the 
   appropriate JCL book. If anyone wants to donate a 
   copy of a JCL book to help further GCJ development 
   please let me know ;-)

I'd be quite happy to receive a copy if there's going to be someone
giving them out /;->


Nic


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