time serialization using nanoseconds