public static void write(Writer out, Object object) {
        SerializeWriter writer = new SerializeWriter();
        try {
            JSONSerializer serializer = new JSONSerializer(writer);
            serializer.write(object);
            writer.writeTo(out);
        } catch (IOException ex) {
            throw new JSONException(ex.getMessage(), ex);
        } finally {
            writer.close();
        }
    }
Set global date format pattern in FastJsonConfig

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