Skip to content

Commit 3ee9a99

Browse files
committed
Add check for 31 Dec 1969
1 parent bafcfd4 commit 3ee9a99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

commons/app/src/main/java/fr/free/nrw/commons/upload/UploadController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ protected Contribution doInBackground(Void... voids /* stare into you */) {
136136
if(cursor != null && cursor.getCount() != 0) {
137137
cursor.moveToFirst();
138138
Date dateCreated = new Date(cursor.getLong(0));
139-
if(dateCreated.equals(new Date(0))) {
139+
Date epochStart = new Date(0);
140+
if(dateCreated.equals(epochStart) || dateCreated.before(epochStart)) {
140141
// If date is incorrect (1st second of unix time) then set it to the current date
141142
dateCreated = new Date();
142143
}

0 commit comments

Comments
 (0)