[ 
https://issues.apache.org/jira/browse/KAFKA-18585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

黃竣陽 resolved KAFKA-18585.
-------------------------
    Resolution: Fixed

> Fix fail test ValuesTest#shouldConvertDateValues 
> -------------------------------------------------
>
>                 Key: KAFKA-18585
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18585
>             Project: Kafka
>          Issue Type: Test
>            Reporter: 黃竣陽
>            Assignee: 黃竣陽
>            Priority: Major
>
> In my local machine, this test will fail at 
> ```
> // ISO8601 strings - accept a string matching pattern "yyyy-MM-dd"
> java.util.Date d3 = Values.convertToDate(Date.SCHEMA, 
> LocalDate.ofEpochDay(days).format(DateTimeFormatter.ISO_LOCAL_DATE));
> assertEquals(currentDate, d3);
> ```
> ```
> Expected :Sat Jan 18 08:00:00 CST 2025
> Actual   :Sat Jan 18 00:00:00 CST 2025
> ```
> I think the main reason is timezone issue. The root cause is related to how 
> date information is handled during conversion. In the test case, when we use 
> {{convertToDate}} with a date string in 'yyyy-MM-dd' format, we lose the time 
> information.



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

Reply via email to