Author: michiel Date: 2010-05-17 16:00:50 +0200 (Mon, 17 May 2010) New Revision: 42197
Modified: mmbase/trunk/bridge/src/main/java/org/mmbase/datatypes/DateTimeDataType.java Log: MMB-1958 Modified: mmbase/trunk/bridge/src/main/java/org/mmbase/datatypes/DateTimeDataType.java =================================================================== --- mmbase/trunk/bridge/src/main/java/org/mmbase/datatypes/DateTimeDataType.java 2010-05-17 14:00:08 UTC (rev 42196) +++ mmbase/trunk/bridge/src/main/java/org/mmbase/datatypes/DateTimeDataType.java 2010-05-17 14:00:50 UTC (rev 42197) @@ -40,6 +40,8 @@ private boolean weakPattern = true; // means, may not be changed, must be cloned before changing something private DateTimePattern pattern = DateTimePattern.DEFAULT; + private TimeZone timeZone = null; + /** * Constructor for DateTime field. */ @@ -75,6 +77,7 @@ if (weakPattern) { pattern = dataType.pattern; } + timeZone = dataType.timeZone; } } @@ -133,7 +136,24 @@ pattern.set(p, locale); } + /** + * You can assign a time zone to the datatype. This only has effect on {...@link #getTimeZone}. Normally the timezone is provided by the client, but + * sometimes the timezone can be an intrinsic part of the datatype. + * @since MMBase-1.9.4 + */ + public void setTimeZone(TimeZone tz) { + timeZone = tz; + } + /** + * A timezone can be attributed. + * @return A TimeZone or <code>null</code> (default) + * @since MMBase-1.9.4 + */ + public TimeZone getTimeZone() { + return timeZone; + } + @Override public DateTimeDataType clone(String name) { DateTimeDataType clone = (DateTimeDataType) super.clone(name); _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs