Skip to content

Commit 3c336ef

Browse files
author
touchRED
committed
fix: add UTC timezone to extractors where needed
1 parent 8ad9309 commit 3c336ef

File tree

8 files changed

+8
-4
lines changed

8 files changed

+8
-4
lines changed

src/extractors/custom/clinicaltrials.gov/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const ClinicaltrialsGovExtractor = {
1212
date_published: {
1313
// selectors: ['span.term[data-term="Last Update Posted"]'],
1414
selectors: ['div:has(> span.term[data-term="Last Update Posted"])'],
15+
timezone: 'UTC',
1516
},
1617

1718
content: {

src/extractors/custom/clinicaltrials.gov/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('ClinicaltrialsGovExtractor', () => {
5858

5959
// Update these values with the expected values from
6060
// the article.
61-
assert.equal(date_published, '2018-11-21T05:00:00.000Z');
61+
assert.equal(date_published, '2018-11-21T00:00:00.000Z');
6262
});
6363

6464
it('returns the content', async () => {

src/extractors/custom/genius.com/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const GeniusComExtractor = {
2020
},
2121
],
2222
],
23+
timezone: 'UTC',
2324
},
2425

2526
dek: {

src/extractors/custom/genius.com/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('GeniusComExtractor', () => {
5353

5454
// Update these values with the expected values from
5555
// the article.
56-
assert.equal(date_published, '1984-06-25T04:00:00.000Z');
56+
assert.equal(date_published, '1984-06-25T00:00:00.000Z');
5757
});
5858

5959
it('returns the lead_image_url', async () => {

src/extractors/custom/people.com/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const PeopleComExtractor = {
1414
'.mntl-attribution__item-date',
1515
['meta[name="article:published_time"]', 'value'],
1616
],
17+
timezone: 'UTC',
1718
},
1819

1920
lead_image_url: {

src/extractors/custom/people.com/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('PeopleComExtractor', () => {
5656

5757
// Update these values with the expected values from
5858
// the article.
59-
assert.equal(date_published, '2016-12-12T14:22:00.000Z');
59+
assert.equal(date_published, '2016-12-12T09:22:00.000Z');
6060
});
6161

6262
it('returns the lead_image_url', async () => {

src/extractors/custom/pitchfork.com/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const PitchforkComExtractor = {
1414

1515
date_published: {
1616
selectors: ['div[class^="InfoSliceWrapper-"]', ['.pub-date', 'datetime']],
17+
timezone: 'UTC',
1718
},
1819

1920
dek: {

src/extractors/custom/pitchfork.com/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('PitchforkComExtractor', () => {
4141
it('returns the date_published', async () => {
4242
const { date_published } = await result;
4343

44-
assert.equal(date_published, '2019-06-07T04:00:00.000Z');
44+
assert.equal(date_published, '2019-06-07T00:00:00.000Z');
4545
});
4646

4747
it('returns the dek', async () => {

0 commit comments

Comments
 (0)