Commits

Anonymous committed a725f99

Added support to use creation date if no EXIV date

  • Participants
  • Parent commits 0789cb8

Comments (0)

Files changed (1)

File Renamer/Main.cs

 			if (this.dateTime == null) {
 				this.dateTime = tags.GetString(ExifDirectory.TAG_DATETIME);	
 				if (this.dateTime == null) {
-					this.dateTime = "2000:01:01 00:00:00";
+					System.DateTime date = new FileInfo(file).CreationTimeUtc;
+					this.dateTime = date.Year.ToString() + ":"
+						+ date.Month.ToString() + ":"
+						+ date.Day.ToString() + " "
+						+ date.ToLongTimeString();
 				}
 			}
 		}