@Override
  public Long getInteger( Object object ) throws KettleValueException {
    Timestamp timestamp = getTimestamp( object );
    if ( timestamp == null ) {
      return null;
    }
    TimeZone defaultTimeZone = TimeZone.getDefault();
    TimeZone currentZone = getDateFormatTimeZone();

    long milliseconds = timestamp.getTime();
    int timezoneDifference = currentZone.getOffset(milliseconds) - defaultTimeZone.getOffset(milliseconds);
    if ( Const.KETTLE_TIMESTAMP_NUMBER_CONVERSION_MODE_NANOSECONDS.equalsIgnoreCase( conversionMode ) ) {
      long seconds = TimeUnit.SECONDS.convert( milliseconds, TimeUnit.MILLISECONDS );
      long nanos = timestamp.getNanos();
      nanos += TimeUnit.NANOSECONDS.convert( timezoneDifference, TimeUnit.MILLISECONDS );
      return seconds * 1000000000L + nanos;
    } else {
      return milliseconds + timezoneDifference;
    }
  }
@Test
  public void testConvertTimestampToInteger_Milliseconds() throws KettleValueException {
    System.setProperty( Const.KETTLE_TIMESTAMP_NUMBER_CONVERSION_MODE,
      Const.KETTLE_TIMESTAMP_NUMBER_CONVERSION_MODE_MILLISECONDS );
    ValueMetaTimestamp valueMetaTimestamp = new ValueMetaTimestamp();
    long result = valueMetaTimestamp.getInteger( TIMESTAMP_WITH_NANOSECONDS );
    assertEquals( 1567308896123L, result );
  }