code: private static Timestamp createWithCarry(long seconds, long nanos) {
          if (nanos > 999999999) {
              seconds = seconds + nanos / 1000000000;
              nanos = nanos % 1000000000;
          }
  
          if (nanos < 0) {
              long pastSec = nanos / 1000000000;
              pastSec--;
              seconds += pastSec;
              nanos -= pastSec * 1000000000;
          }
  
          return new Timestamp(seconds, (int) nanos);
      }
docs: Creates a new time stamp by carrying nanosecs into seconds if necessary.
  
  @param seconds new seconds
  @param ofNanos new nanoseconds (can be the whole long range)
  @return the new timestamp