Using UTC to query date ranges. Removed stray console log from MindGeek scraper.

This commit is contained in:
DebaucheryLibrarian
2020-08-26 02:01:38 +02:00
parent 52f66e7982
commit 8611d738b0
6 changed files with 19 additions and 9 deletions

View File

@@ -1,13 +1,16 @@
import utc from 'dayjs/plugin/utc';
import dayjs from 'dayjs';
dayjs.extend(utc);
const dateRanges = {
latest: () => ({
after: '1900-01-01 00:00:00',
before: dayjs().format('YYYY-MM-DD HH:mm:ss'),
before: dayjs.utc().format('YYYY-MM-DD HH:mm:ss'),
orderBy: 'DATE_DESC',
}),
upcoming: () => ({
after: dayjs().format('YYYY-MM-DD HH:mm:ss'),
after: dayjs.utc().format('YYYY-MM-DD HH:mm:ss'),
before: '2100-01-01 00:00:00',
orderBy: 'DATE_ASC',
}),