Skip to content

Commit

Permalink
fix another test with timezone not set
Browse files Browse the repository at this point in the history
  • Loading branch information
B0pol committed May 11, 2020
1 parent 912643b commit 4ad6627
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeChannelLinkHandlerFactory;
import org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper;
import org.schabi.newpipe.extractor.stream.*;
import org.schabi.newpipe.extractor.utils.JsonUtils;
import org.schabi.newpipe.extractor.utils.Parser;
import org.schabi.newpipe.extractor.utils.Utils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ public void testGetTextualUploadDate() throws ParsingException {
@Test
public void testGetUploadDate() throws ParsingException, ParseException {
final Calendar instance = Calendar.getInstance();
instance.setTime(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss +0000").parse("2019/11/21 22:25:30 +0000"));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss +0000");
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
instance.setTime(sdf.parse("2019/11/21 22:25:30 +0000"));
assertEquals(instance, requireNonNull(extractor.getUploadDate()).date());
}

Expand Down

0 comments on commit 4ad6627

Please sign in to comment.