mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Add check for 31 Dec 1969
This commit is contained in:
parent
bafcfd46ca
commit
3ee9a99a7f
1 changed files with 2 additions and 1 deletions
|
|
@ -136,7 +136,8 @@ public class UploadController {
|
|||
if(cursor != null && cursor.getCount() != 0) {
|
||||
cursor.moveToFirst();
|
||||
Date dateCreated = new Date(cursor.getLong(0));
|
||||
if(dateCreated.equals(new Date(0))) {
|
||||
Date epochStart = new Date(0);
|
||||
if(dateCreated.equals(epochStart) || dateCreated.before(epochStart)) {
|
||||
// If date is incorrect (1st second of unix time) then set it to the current date
|
||||
dateCreated = new Date();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue