public final boolean isWriteClassName(Type fieldType, Object obj) {
        return out.isEnabled(SerializerFeature.WriteClassName) //
               && (fieldType != null //
                   || (!out.isEnabled(SerializerFeature.NotWriteRootClassName)) //
                   || (context != null && (context.parent != null)));
    }
Set global date format pattern in FastJsonConfig

@param dateFormatPattern global date format pattern
src/main/java/com/alibaba/fastjson/serializer/JSONSerializer.java