Skip to content

Why LocalDateDeserializer used UTC ? #119

Closed
@ChaceYang

Description

@ChaceYang

Why LocalDateDeserializer used UTC?
Closed issue LocalDateDeserializer ignores local time zone

JDK use system default zone.

    public static LocalDateTime now() {
        return now(Clock.systemDefaultZone());
    }

    public static LocalDateTime now(Clock clock) {
        Objects.requireNonNull(clock, "clock");
        Instant now = clock.instant();
        ZoneOffset offset = clock.getZone().getRules().getOffset(now);
        return ofEpochSecond(now.getEpochSecond(), now.getNano(), offset);
    }

Maybe LocalDateDeserializer used UTC is worst?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions