Encode time types as tuples.