private DateFormat _force(DateFormat df, TimeZone tz) { if (df instanceof StdDateFormat) { return ((StdDateFormat) df).withTimeZone(tz); } // we don't know if original format might be shared; better create a clone: df = (DateFormat) df.clone(); df.setTimeZone(tz); return df; } }
final Locale loc = format.hasLocale() ? format.getLocale() : ctxt.getLocale(); StdDateFormat std = (StdDateFormat) df; std = std.withTimeZone(tz); std = std.withLocale(loc); if (lenient != null) {
std = std.withTimeZone(format.getTimeZone());
private DateFormat _force(DateFormat df, TimeZone tz) { if (df instanceof StdDateFormat) { return ((StdDateFormat) df).withTimeZone(tz); } // we don't know if original format might be shared; better create a clone: df = (DateFormat) df.clone(); df.setTimeZone(tz); return df; } }
private DateFormat _force(DateFormat df, TimeZone tz) { if (df instanceof StdDateFormat) { return ((StdDateFormat) df).withTimeZone(tz); } // we don't know if original format might be shared; better create a clone: df = (DateFormat) df.clone(); df.setTimeZone(tz); return df; } }
/** * Fluent factory for constructing a new instance that uses specified TimeZone. * Note that timezone used with also be assigned to configured {@link DateFormat}, * changing time formatting defaults. */ public BaseSettings with(TimeZone tz) { if (tz == null) { throw new IllegalArgumentException(); } 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); }
/** * Fluent factory for constructing a new instance that uses specified TimeZone. * Note that timezone used with also be assigned to configured {@link DateFormat}, * changing time formatting defaults. */ public BaseSettings with(TimeZone tz) { if (tz == null) { throw new IllegalArgumentException(); } 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); }
/** * Fluent factory for constructing a new instance that uses specified TimeZone. * Note that timezone used with also be assigned to configured {@link DateFormat}, * changing time formatting defaults. */ public BaseSettings with(TimeZone tz) { if (tz == null) { throw new IllegalArgumentException(); } 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); }
/** * Fluent factory for constructing a new instance that uses specified TimeZone. * Note that timezone used with also be assigned to configured {@link DateFormat}, * changing time formatting defaults. */ public BaseSettings with(TimeZone tz) { if (tz == null) { throw new IllegalArgumentException(); } 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); }
df = ((StdDateFormat) df).withTimeZone(tz); } else {
df = ((StdDateFormat) df).withTimeZone(tz); } else {
final Locale loc = format.hasLocale() ? format.getLocale() : ctxt.getLocale(); StdDateFormat std = (StdDateFormat) df; std = std.withTimeZone(tz); std = std.withLocale(loc); if (lenient != null) {
final Locale loc = format.hasLocale() ? format.getLocale() : ctxt.getLocale(); StdDateFormat std = (StdDateFormat) df; std = std.withTimeZone(tz); std = std.withLocale(loc); df = std;
final Locale loc = format.hasLocale() ? format.getLocale() : ctxt.getLocale(); StdDateFormat std = (StdDateFormat) df; std = std.withTimeZone(tz); std = std.withLocale(loc); df = std;
final Locale loc = format.hasLocale() ? format.getLocale() : ctxt.getLocale(); StdDateFormat std = (StdDateFormat) df; std = std.withTimeZone(tz); std = std.withLocale(loc); df = std;
std = std.withTimeZone(format.getTimeZone());