Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1832

DateTimeUtils dateString to Unix translation error

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 1.10.0
    • Fix Version/s: 1.13.0
    • Component/s: avatica
    • Labels:
      None

      Description

      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:

      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));
             
          }
      }
      

      and the output is:

      -171592
      1500-03-14
      

      it adds an offset of 10 days for some reason.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              stefano.bortoli Stefano Bortoli

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment