Remove erroneous %04Ld formatting
Don't compare datetime_unit_t against -1, add datetime_unit_autodetect instead