Remove DateTimeFormatter.ISO_OFFSET_DATE_TIME usage.

This commit is contained in:
Isira Seneviratne 2020-11-02 09:14:52 +05:30
parent b13c7e1c1e
commit fe31a90cb3

View File

@ -8,7 +8,6 @@ import org.schabi.newpipe.extractor.stream.StreamType;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException; import java.time.format.DateTimeParseException;
public class YoutubeFeedInfoItemExtractor implements StreamInfoItemExtractor { public class YoutubeFeedInfoItemExtractor implements StreamInfoItemExtractor {
@ -61,7 +60,7 @@ public class YoutubeFeedInfoItemExtractor implements StreamInfoItemExtractor {
@Override @Override
public DateWrapper getUploadDate() throws ParsingException { public DateWrapper getUploadDate() throws ParsingException {
try { try {
return new DateWrapper(OffsetDateTime.parse(getTextualUploadDate(), DateTimeFormatter.ISO_OFFSET_DATE_TIME)); return new DateWrapper(OffsetDateTime.parse(getTextualUploadDate()));
} catch (DateTimeParseException e) { } catch (DateTimeParseException e) {
throw new ParsingException("Could not parse date (\"" + getTextualUploadDate() + "\")", e); throw new ParsingException("Could not parse date (\"" + getTextualUploadDate() + "\")", e);
} }