Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-21567

Sql. Conversion from TIMESTAMP to TIMESTAMP_WITH_LOCAL_TIME_ZONE trims millis

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • sql

    Description

      Conversion from TIMESTAMP to TIMESTAMP_WITH_LOCAL_TIME_ZONE loses precision

      String ts  = "1992-01-18 02:30:00.123";
      assertQuery(format("select TIMESTAMP '{}'::TIMESTAMP WITH LOCAL TIME ZONE ", ts))
              .returns(LocalDateTime.parse(ts, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"))
                      .atZone(ZoneId.systemDefault())
                      .toInstant())
              .check();
      
      // Expected: 1992-01-17T22:30:00.123Z <class java.time.Instant>
      // Actual:   1992-01-17T22:30:00Z <class java.time.Instant>
      

      Attachments

        Issue Links

          Activity

            People

              xtern Pavel Pereslegin
              xtern Pavel Pereslegin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m