public long getSeconds() {
    if (!timestampTZEmpty) {
      return timestampTZ.getEpochSecond();
    } else if (!bytesEmpty) {
      return getSeconds(currentBytes, offset);
    }
    throw new IllegalStateException("Both timestamp and bytes are empty");
  }
The data of TimestampTZWritable can be stored either in a byte[]
or in a TimestampTZ object. Calling this method ensures that the byte[]
is populated from the TimestampTZ object if previously empty.
serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampLocalTZWritable.java