Make start date and day of month aware of timezones (fixes #12555) (#12696)

* WIP: #12555

-dayOfMonth takes timezone into account on task update for monthly dailys
-startDate set to start of day in user's tz on task update for monthly
dailys
-tweaked a test so that it's actually testing something

* WIP: 12555

-task.startDate gets set to start of day in user's tz on task creation
and task update
-set preferences.timezoneOffset to nonzero value in certian test user objects
-removed date literals in test:api-v3:integration:tasks:PUT
This commit is contained in:
bakerty
2021-01-10 07:02:40 -08:00
committed by GitHub
parent e8d3090a99
commit db3d233ae5
8 changed files with 83 additions and 29 deletions

View File

@@ -12,7 +12,7 @@ describe('PUT /tasks/:id', () => {
let challenge;
before(async () => {
user = await generateUser();
user = await generateUser({ 'preferences.timezoneOffset': new Date().getTimezoneOffset() });
guild = await generateGroup(user);
challenge = await generateChallenge(user, guild);
await user.post(`/challenges/${challenge._id}/join`);