You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/06/04 02:56:00 UTC

[jira] [Commented] (NIFI-15973) java.sql.Date/Timestamp conversions in record framework apply Julian calendar for pre-1582 values

    [ https://issues.apache.org/jira/browse/NIFI-15973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18085963#comment-18085963 ] 

ASF subversion and git services commented on NIFI-15973:
--------------------------------------------------------

Commit 452317dab64c5dfabcf941ae0dee51da2ab2d02b in nifi's branch refs/heads/main from Kamil Trysiński
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=452317dab64 ]

NIFI-15973 Fixed Date Conversion for consistent use of Proleptic Gregorian Calendar (#11283)

Signed-off-by: David Handermann <ex...@apache.org>

> java.sql.Date/Timestamp conversions in record framework apply Julian calendar for pre-1582 values
> -------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-15973
>                 URL: https://issues.apache.org/jira/browse/NIFI-15973
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Kamil Trysiński
>            Assignee: Kamil Trysiński
>            Priority: Minor
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> java.sql.Timestamp#toLocalDateTime, java.sql.Timestamp#valueOf(LocalDateTime), java.sql.Date#toLocalDate, and java.sql.Date#valueOf(LocalDate) all route through GregorianCalendar, which applies Julian-calendar semantics for years before 1582-10-15.
>  
> NiFi's record-framework converters and the Avro date logical-type bridge use these APIs, so a value whose epoch milliseconds represent year 0001 in the proleptic Gregorian calendar (the calendar java.time, Avro, and most downstream sinks use) is shifted backward by approximately two days and rendered as year 0000. Downstream sinks that validate against an inclusive year-1-to-9999 range then reject the row with errors such as "Timestamp out of representable inclusive range of years between 1 and 9999, ... value:0000-12-30T10:47Z".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)