Add writeTimeAP and writeDateAP