Volker Weber wrote:
Hello!

you can implement it like this

public Date getTimeZone() { return TimeZone.getDefault();}
Hmm... but TimeZone.getDefault() returns type of TimeZone, not the Date!

"Asia/Yekaterinburg" is recognized by my java implementation,
Hmm... I use 1.4.2_04, will upgrade to the latest 1.4.2_09 and check. Unfortunatelly I can not use 1.5 due some reasons. Also have You tried it with JSF or just test class?

if you got this from TimeZone.getDefault().getId() it should be recongnized.
But it didn't. May be this is JVM bug.

Hello, Volker!

    I found, that setting timezone to normalized form (e.g. GMT+6)


With this you still have the problem to change this every half year.

Yes, but we can use something like
public int getOffset() {
/|      Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)) 
/ (60 * 1000)|./
}

As per JDK docs

With respect,
   Boris



Regards
Volker

Reply via email to