[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ProgSoc] Java Question: Timezone
At 13:09 02 Feb 2000 +1100, Bryn Price wrote:
> TimeZone tz = TimeZone.getTimeZone("AET");
> TimeZone.setDefault(tz);
Or just 'export TZ=AET' before you run.
Actually, that works for 1.1.7, but I had trouble with it on 1.2 and 1.1.8. Go
figure. Sun has been screwing up Australian timezones for Java on all
platforms since day 1, in my experience, anyway.
At the moment, I'm using "GMT-11" for summer time and GMT-10 the rest of the
time. Or is it the other way around? Whatever, you'll figure it out.
I consider it much much nicer to set an environment variable than hardcode the
timezone into Java. Forget platform independence, what if someone wanted to
run your program from Perth? ;0
Paul
--
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@nospam.progsoc.uts.edu.au.
If you are having trouble, ask owner-progsoc@nospam.progsoc.uts.edu.au for help.
This list is archived at <http://www.progsoc.uts.edu.au/lists/progsoc/>