autodetect timestamp format