Nico Klasens <[EMAIL PROTECTED]> wrote:
> Well it is not perfect yet. I made a little mistake. I didn't add the
> timezone to the calendar instance. Just some minutes ago I committed the
new
> wizard.java files.
>
May be it was better if I made the private method getTimeZone in DateFormat
public
private static TimeZone getTimeZone(String timeZone) {
if (timeZone == null || "".equals(timeZone.trim())) {
return TimeZone.getDefault();
} else {
return TimeZone.getTimeZone(timeZone);
}
}
Then you can use simply
Calendar cal = Calendar.getInstance(getTimeZone(timezone));
The new code you inserted does handle the timezone string a bit different
then above and it is probably a good idea to do it everywhere the same.
A small remark: it does not make things faster by using an if statement with
Calandar.getInstance(), because then Calendar will lookup the timezone
anyway with TimeZone.getDefault().
Martijn Houtman