v1/src/main/java/com/google/cloud/teleport/spanner/ExportTransform.java [1000:1030]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  static TimestampBound createTimestampBound(String timestamp) {
    if ("".equals(timestamp)) {
      /* If no timestamp is specified, read latest data */
      return TimestampBound.strong();
    } else {
      /* Else try to read data in the timestamp specified. */
      com.google.cloud.Timestamp tsVal;
      try {
        tsVal = com.google.cloud.Timestamp.parseTimestamp(timestamp);
      } catch (Exception e) {
        throw new IllegalStateException("Invalid timestamp specified " + timestamp);
      }

      /*
       * If timestamp specified is in the future, spanner read will wait
       * till the time has passed. Abort the job and complain early.
       */
      if (tsVal.compareTo(com.google.cloud.Timestamp.now()) > 0) {
        throw new IllegalStateException("Timestamp specified is in future " + timestamp);
      }

      /*
       * Export jobs with Timestamps which are older than
       * maximum staleness time (one hour) fail with the FAILED_PRECONDITION
       * error - https://cloud.google.com/spanner/docs/timestamp-bounds
       * Hence we do not handle the case.
       */

      return TimestampBound.ofReadTimestamp(tsVal);
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



v1/src/main/java/com/google/cloud/teleport/templates/common/SpannerConverters.java [846:876]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  static TimestampBound getTimestampBound(String timestamp) {
    if ("".equals(timestamp)) {
      /* If no timestamp is specified, read latest data */
      return TimestampBound.strong();
    } else {
      /* Else try to read data in the timestamp specified. */
      com.google.cloud.Timestamp tsVal;
      try {
        tsVal = com.google.cloud.Timestamp.parseTimestamp(timestamp);
      } catch (Exception e) {
        throw new IllegalStateException("Invalid timestamp specified " + timestamp);
      }

      /*
       * If timestamp specified is in the future, spanner read will wait
       * till the time has passed. Abort the job and complain early.
       */
      if (tsVal.compareTo(com.google.cloud.Timestamp.now()) > 0) {
        throw new IllegalStateException("Timestamp specified is in future " + timestamp);
      }

      /*
       * Export jobs with Timestamps which are older than
       * maximum staleness time (one hour) fail with the FAILED_PRECONDITION
       * error - https://cloud.google.com/spanner/docs/timestamp-bounds
       * Hence we do not handle the case.
       */

      return TimestampBound.ofReadTimestamp(tsVal);
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



