[ https://issues.apache.org/jira/browse/CALCITE-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16083923#comment-16083923 ]
yuemeng commented on CALCITE-1884: ---------------------------------- [~cloneman] why are u testing date before 1970-01-01? can you test date after 1970-01-01? {code} public class DateTimeUtils { /** The julian date of the epoch, 1970-01-01. */ public static final int EPOCH_JULIAN = 2440588;//valid from 1970-01-01 {code} > dateStringToUnixDate() / unixDateToString() returns wrong results > ----------------------------------------------------------------- > > Key: CALCITE-1884 > URL: https://issues.apache.org/jira/browse/CALCITE-1884 > Project: Calcite > Issue Type: Bug > Components: avatica > Affects Versions: 1.13.0 > Reporter: Haohui Mai > Assignee: yuemeng > > dateStringToUnixDate() / unixDateToString() do not return consistent result. > The following test fails: > {noformat} > @Test public void testUnixDate() { > int days = DateTimeUtils.dateStringToUnixDate("1500-04-30"); > assertEquals("1500-04-30", DateTimeUtils.unixDateToString(days)); > } > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)