Hello,
I'm in New Zealand, and we are currently observing Daylight Savings Time.
I am using this:
DateFormat DF = new SimpleDateFormat( "EEE dd MMM yyyy hh:mm aa zz : zzzzzz" );
The Time Zone it prints is:
NZST : New Zealand Standard Time
... and the hour reported is off by one.
But we're in Daylight Savings Time. The underlying Windows OS knows it's NZDT, and reports the time correctly.
I've read a bit about various problems and thoughts regarding this, but I can't help but feel I'm missing something. None of what I read appears to address this - most is about converting to other time zones, or comparing times.
Can
Java tell what time it is? Why doesn't Java simply print out what the current system time is correctly?
I don't want to parse the time - we might install our application in another machine in another time zone, and I would want/expect it to pick up whether it's currently operating under DST or not in that time zone - the OS can tell.
What am I missing, please? Can this be done, or am I wasting my time trying to solve it?
Thanks for the answer to that last question especially - I have read about various ways to force DST, but that's the point of time zones - we know whether we're in DST already because of the time zone information. I really expect this to be the way it is, and so I expect I have missed something.
Cheers,
Bret