fix: add UTC timezone to extractors where needed

fix-remove-moment-js
touchRED 1 year ago
parent 8ad9309e3b
commit 3c336ef155

@ -12,6 +12,7 @@ export const ClinicaltrialsGovExtractor = {
date_published: {
// selectors: ['span.term[data-term="Last Update Posted"]'],
selectors: ['div:has(> span.term[data-term="Last Update Posted"])'],
timezone: 'UTC',
},
content: {

@ -58,7 +58,7 @@ describe('ClinicaltrialsGovExtractor', () => {
// Update these values with the expected values from
// the article.
assert.equal(date_published, '2018-11-21T05:00:00.000Z');
assert.equal(date_published, '2018-11-21T00:00:00.000Z');
});
it('returns the content', async () => {

@ -20,6 +20,7 @@ export const GeniusComExtractor = {
},
],
],
timezone: 'UTC',
},
dek: {

@ -53,7 +53,7 @@ describe('GeniusComExtractor', () => {
// Update these values with the expected values from
// the article.
assert.equal(date_published, '1984-06-25T04:00:00.000Z');
assert.equal(date_published, '1984-06-25T00:00:00.000Z');
});
it('returns the lead_image_url', async () => {

@ -14,6 +14,7 @@ export const PeopleComExtractor = {
'.mntl-attribution__item-date',
['meta[name="article:published_time"]', 'value'],
],
timezone: 'UTC',
},
lead_image_url: {

@ -56,7 +56,7 @@ describe('PeopleComExtractor', () => {
// Update these values with the expected values from
// the article.
assert.equal(date_published, '2016-12-12T14:22:00.000Z');
assert.equal(date_published, '2016-12-12T09:22:00.000Z');
});
it('returns the lead_image_url', async () => {

@ -14,6 +14,7 @@ export const PitchforkComExtractor = {
date_published: {
selectors: ['div[class^="InfoSliceWrapper-"]', ['.pub-date', 'datetime']],
timezone: 'UTC',
},
dek: {

@ -41,7 +41,7 @@ describe('PitchforkComExtractor', () => {
it('returns the date_published', async () => {
const { date_published } = await result;
assert.equal(date_published, '2019-06-07T04:00:00.000Z');
assert.equal(date_published, '2019-06-07T00:00:00.000Z');
});
it('returns the dek', async () => {

Loading…
Cancel
Save