You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stefano Bortoli (JIRA)" <ji...@apache.org> on 2017/06/07 09:59:18 UTC

[jira] [Created] (CALCITE-1832) DateTimeUtils dateString to Unix translation error

Stefano Bortoli created CALCITE-1832:
----------------------------------------

             Summary: DateTimeUtils dateString to Unix translation error
                 Key: CALCITE-1832
                 URL: https://issues.apache.org/jira/browse/CALCITE-1832
             Project: Calcite
          Issue Type: Bug
          Components: avatica
    Affects Versions: 1.10.0
            Reporter: Stefano Bortoli


Using the latest snapshot of Calcite, one of the Apache Flink Test fails. The failure is due to an error in CAST, that relies on Avatica DateTimeUtils.

I have implemented a simple class test:
{code}
public class Test 
{
    public static void main( String[] args )
    {
       int dateInt = DateTimeUtils.dateStringToUnixDate("1500-03-04");
       System.out.println(dateInt);
       System.out.println(DateTimeUtils.unixDateToString(dateInt));
       
    }
}
{code}

and the output is:
{code}
-171592
1500-03-14
{code}

it adds an offset of 10 days for some reason. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)