add write time and ttl functions
test writetime() and ttl() functions