Add support for ARCHIVE environment variable for path, fix date format