Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0
-
None
-
JDK 1.5, 1.6
Description
Enhance the DateTool with:
/**
- The key used for specifying a default format via tool configuration.
*/
public static final String TIMEZONE_KEY = "timezone";
private TimeZone timezone = TimeZone.getDefault();
/**
- Does the actual configuration. This is protected, so
- subclasses may share the same ValueParser and call configure
- at any time, while preventing templates from doing so when
- configure(Map) is locked.
*/
protected void configure(ValueParser values) {
super.configure(values);
String tzId = values.getString(TIMEZONE_KEY);
if (tzId != null)
}
// Replace current getTimezone() method with:
public TimeZone getTimezone()
public void setTimezone(TimeZone timezone)
{ this.timezone = timezone; }