private void validateDatetime(Shape shape, Node value, Emitter emitter) {
        if (!value.isStringNode()) {
            emitter.accept(value,
                    "Expected a string value for a date-time timestamp "
                            + "(e.g., \"1985-04-12T23:20:50.52Z\")");
            return;
        }

        String timestamp = value.expectStringNode().getValue();
        // Newer versions of Java support parsing instants that have an offset.
        // See: https://bugs.openjdk.java.net/browse/JDK-8166138
        // However, Smithy doesn't allow offsets for timestamp shapes.
        if (!(timestamp.endsWith("Z") && isValidFormat(timestamp, DATE_TIME_Z))) {
            emitter.accept(value,
                    "Invalid string value, `" + timestamp + "`, provided for timestamp, `"
                            + shape.getId() + "`. Expected an RFC 3339 formatted timestamp (e.g., "
                            + "\"1985-04-12T23:20:50.52Z\")");
        }
    }
Validates that timestamp shapes contain values that are compatible with their
timestampFormat traits or contain values that are numbers or an RFC 3339
date-time production.
smithy-model/src/main/java/software/amazon/smithy/model/validation/node/TimestampFormatPlugin.java