class FieldReaderDateTimeCodec<T>
        extends FieldReader<T> {
    final ObjectReader dateReader;
    final boolean formatUnixTime;
    final boolean formatMillis;

    public FieldReaderDateTimeCodec(
            String fieldName,
            Type fieldType,
            Class fieldClass,
            int ordinal,
            long features,
            String format,
            Locale locale,
            Object defaultValue,
            JSONSchema schema,
            Method method,
            Field field,
            ObjectReader dateReader
    ) {
        super(fieldName, fieldType, fieldClass, ordinal, features, format, locale, defaultValue, schema, method, field);
        this.dateReader = dateReader;

        boolean formatUnixTime = false, formatMillis = false, hasDay = false, hasHour = false;
        if (format != null) {
            switch (format) {
                case "unixtime":
                    formatUnixTime = true;
                    break;
                case "millis":
                    formatMillis = true;
                    break;
                default:
                    break;
            }
        }
        this.formatUnixTime = formatUnixTime;
        this.formatMillis = formatMillis;
    }

    @Override
    public final Object readFieldValue(JSONReader jsonReader) {
        return dateReader.readObject(jsonReader, fieldType, fieldName, features);
    }

    @Override
    public final ObjectReader getObjectReader(JSONReader jsonReader) {
        return dateReader;
    }

    public final ObjectReader getObjectReader(JSONReader.Context context) {
        return dateReader;
    }

    protected abstract void accept(T object, Date value);

    protected abstract void acceptNull(T object);

    protected abstract void accept(T object, Instant value);

    protected abstract void accept(T object, LocalDateTime ldt);

    protected abstract void accept(T object, ZonedDateTime zdt);

    protected abstract Object apply(Date value);

    protected abstract Object apply(Instant value);

    protected abstract Object apply(ZonedDateTime zdt);

    protected abstract Object apply(LocalDateTime zdt);

    protected abstract Object apply(long millis);

    @Override
    public void accept(T object, Object value) {<FILL_FUNCTION_BODY>}

    public boolean supportAcceptType(Class valueClass) {
        return valueClass == Date.class
                || valueClass == String.class;
    }
}

        if (value == null) {
            acceptNull(object);
            return;
        }

        if (value instanceof String) {
            String str = (String) value;
            if (str.isEmpty() || "null".equals(str)) {
                acceptNull(object);
                return;
            }

            if ((format == null || formatUnixTime || formatMillis) && IOUtils.isNumber(str)) {
                long millis = Long.parseLong(str);
                if (formatUnixTime) {
                    millis *= 1000L;
                }
                accept(object, millis);
                return;
            } else {
                value = DateUtils.parseDate(str, format, DateUtils.DEFAULT_ZONE_ID);
            }
        }

        if (value instanceof Date) {
            accept(object, (Date) value);
        } else if (value instanceof Instant) {
            accept(object, (Instant) value);
        } else if (value instanceof Long) {
            accept(object, ((Long) value).longValue());
        } else if (value instanceof LocalDateTime) {
            accept(object, (LocalDateTime) value);
        } else if (value instanceof ZonedDateTime) {
            accept(object, (ZonedDateTime) value);
        } else {
            throw new JSONException("not support value " + value.getClass());
        }
    
<methods>public void <init>(java.lang.String, java.lang.reflect.Type, Class#RAW, int, long, java.lang.String, java.util.Locale, java.lang.Object, com.alibaba.fastjson2.schema.JSONSchema, java.lang.reflect.Method, java.lang.reflect.Field) ,public void accept(T, boolean) ,public void accept(T, byte) ,public void accept(T, short) ,public void accept(T, int) ,public void accept(T, long) ,public void accept(T, char) ,public void accept(T, float) ,public void accept(T, double) ,public abstract void accept(T, java.lang.Object) ,public void acceptDefaultValue(T) ,public void acceptExtra(java.lang.Object, java.lang.String, java.lang.Object) ,public void addResolveTask(com.alibaba.fastjson2.JSONReader, java.lang.Object, java.lang.String) ,public void addResolveTask(com.alibaba.fastjson2.JSONReader, List#RAW, int, java.lang.String) ,public boolean belongTo(Class#RAW) ,public ObjectReader#RAW checkObjectAutoType(com.alibaba.fastjson2.JSONReader) ,public int compareTo(FieldReader#RAW) ,public BiConsumer#RAW getFunction() ,public ObjectReader#RAW getInitReader() ,public Class#RAW getItemClass() ,public long getItemClassHash() ,public ObjectReader#RAW getItemObjectReader(com.alibaba.fastjson2.JSONReader.Context) ,public ObjectReader#RAW getItemObjectReader(com.alibaba.fastjson2.JSONReader) ,public java.lang.reflect.Type getItemType() ,public ObjectReader#RAW getObjectReader(com.alibaba.fastjson2.JSONReader) ,public ObjectReader#RAW getObjectReader(com.alibaba.fastjson2.JSONReader.Context) ,public ObjectReader#RAW getObjectReader(com.alibaba.fastjson2.reader.ObjectReaderProvider) ,public boolean isReadOnly() ,public boolean isUnwrapped() ,public void processExtra(com.alibaba.fastjson2.JSONReader, java.lang.Object) ,public abstract java.lang.Object readFieldValue(com.alibaba.fastjson2.JSONReader) ,public abstract void readFieldValue(com.alibaba.fastjson2.JSONReader, T) ,public void readFieldValueJSONB(com.alibaba.fastjson2.JSONReader, T) ,public boolean sameTo(FieldReader#RAW) ,public boolean supportAcceptType(Class#RAW) ,public java.lang.String toString() <variables>public final non-sealed java.lang.Object defaultValue,public final non-sealed long features,public final non-sealed java.lang.reflect.Field field,public final non-sealed Class#RAW fieldClass,final non-sealed boolean fieldClassSerializable,public final non-sealed java.lang.String fieldName,final non-sealed long fieldNameHash,final non-sealed long fieldNameHashLCase,protected final non-sealed long fieldOffset,public final non-sealed java.lang.reflect.Type fieldType,public final non-sealed java.lang.String format,Class#RAW itemClass,volatile ObjectReader#RAW itemReader,java.lang.reflect.Type itemType,public final non-sealed java.util.Locale locale,public final non-sealed java.lang.reflect.Method method,final non-sealed boolean noneStaticMemberClass,public final non-sealed int ordinal,final non-sealed boolean readOnly,volatile ObjectReader#RAW reader,volatile com.alibaba.fastjson2.JSONPath referenceCache,public final non-sealed com.alibaba.fastjson2.schema.JSONSchema schema