Skip to content

Commit a691d6d

Browse files
committed
fix upload date: there was a one hour delay
on peertube.co.uk: https://i.imgur.com/8Pai1rb.png on newpipe, before this commit: https://i.imgur.com/NIRbs4Z.png on newpipe, with this commit: https://i.ibb.co/mhKKtRD/Screenshot-20200123-185422-New-Pipe-Debug.png
1 parent 20da475 commit a691d6d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeParsingHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.text.SimpleDateFormat;
55
import java.util.Calendar;
66
import java.util.Date;
7+
import java.util.concurrent.TimeUnit;
78

89
import org.jsoup.helper.StringUtil;
910
import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException;
@@ -27,6 +28,7 @@ public static Calendar parseDateFrom(String textualUploadDate) throws ParsingExc
2728
Date date;
2829
try {
2930
date = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.S'Z'").parse(textualUploadDate);
31+
date = new Date(date.getTime() + TimeUnit.HOURS.toMillis(1));
3032
} catch (ParseException e) {
3133
throw new ParsingException("Could not parse date: \"" + textualUploadDate + "\"", e);
3234
}

0 commit comments

Comments
 (0)