Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NZDT - New Zealand Daylight Time?

807588Apr 1 2009 — edited Apr 2 2009
Hello,
I have a desktop set to NZ Daylight Savings time. The Windows OS can tell, and reports the date properly.

Java will not. It is one hour off on the time, and it will not report 'NZDT' in any output string I can program. I have been reading through the APIs, and trying various experiments, and nothing I can come up with will print anything besides time with 'NZST'.

Can Java handle NZDT? Should I expect our JDKs to do this?

C:\Documents and Settings\bret.waldow>java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)

If so, can someone provide example code that I could expect to print that 'NZDT' time zone annotation when it prints the current date/time, so I can see how to do it?

Thanks in advance,
Bret
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 30 2009
Added on Apr 1 2009
4 comments
1,424 views