getCurrentTimestampWithOptionalInterval