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
+1 -1
View File
@@ -378,7 +378,7 @@ export const DailySchema = new Schema(_.defaults({
startDate: {
$type: Date,
default () {
return moment().startOf('day').toDate();
return moment.utc().toDate();
},
required: true,
},