Hello,
Boris Kovalenko wrote:
> 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!
your right, it must be
public TimeZone getTimeZone() { return TimeZone.getDefault();}
but this is the object type as expected by the timeZones valueExpression
in the converter.
>
>>
>>
>> "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.
the jvm shouldn't return an id which is not recongnized.
you can get all valid ids by timeZone.getAvailableIDs().
>
> 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
>>
>>
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.