You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/07/19 21:05:00 UTC

[jira] [Commented] (CALCITE-1884) DateTimeUtils produces incorrect results for days before Gregorian cutovers

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

Julian Hyde commented on CALCITE-1884:
--------------------------------------

You've now made this bug a duplicate of CALCITE-1832, which I recently closed as not-a-bug because it is intended behavior.

> DateTimeUtils produces incorrect results for days before Gregorian cutovers
> ---------------------------------------------------------------------------
>
>                 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: Haohui Mai
>
> 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)