Date test

main
Bob Mottram 2020-12-14 15:17:30 +00:00
parent 96c139a63e
commit ec87fbf4f8
1 changed files with 4 additions and 0 deletions

View File

@ -2437,6 +2437,10 @@ def testFirstParagraphFromString():
def testParseFeedDate(): def testParseFeedDate():
print('testParseFeedDate') print('testParseFeedDate')
pubDate = "2020-12-14T00:08:06+00:00"
publishedDate = parseFeedDate(pubDate)
assert publishedDate == "2020-12-14 00:08:06+00:00"
pubDate = "Tue, 08 Dec 2020 06:24:38 -0600" pubDate = "Tue, 08 Dec 2020 06:24:38 -0600"
publishedDate = parseFeedDate(pubDate) publishedDate = parseFeedDate(pubDate)
assert publishedDate == "2020-12-08 12:24:38+00:00" assert publishedDate == "2020-12-08 12:24:38+00:00"