test for writetime