Code example for DateFormat

Methods: clone, setTimeZone

0
        DateFormat df = _dateFormat;
        if (df instanceof StdDateFormat) {
            df = ((StdDateFormat) df).withTimeZone(tz);
        } else { 
            // we don't know if original format might be shared; better create a clone: 
            df = (DateFormat) df.clone();
            df.setTimeZone(tz);
        } 
        return new BaseSettings(_classIntrospector, _annotationIntrospector,
                _visibilityChecker, _propertyNamingStrategy, _typeFactory,
                _typeResolverBuilder, df, _handlerInstantiator, _locale,
                tz, _defaultBase64);
    } 
 
    /** 
     * @since 2.1 
     */ 
    public BaseSettings with(Base64Variant base64) {
        if (base64 == _defaultBase64) {
            return this;
        }