File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -865,7 +865,8 @@ const userHelper = function () {
865865 }
866866
867867 const infringement = {
868- date : moment ( ) . utc ( ) . format ( 'YYYY-MM-DD' ) ,
868+ // Use LA local date so the stored date matches the scheduler's intended business timezone
869+ date : moment ( ) . tz ( 'America/Los_Angeles' ) . startOf ( 'day' ) . format ( 'YYYY-MM-DD' ) ,
869870 description,
870871 createdDate : hasTimeOffRequest
871872 ? moment ( requestForTimeOff . createdAt ) . format ( 'YYYY-MM-DD' )
@@ -1149,8 +1150,7 @@ const userHelper = function () {
11491150
11501151 logger . logInfo ( `Job for deleting blue squares older than 1 year starting at ${ nowLA . format ( ) } ` ) ;
11511152
1152- const cutOffDate = nowLA . clone ( ) . subtract ( 1 , 'year' ) . toDate ( ) ;
1153-
1153+ const cutOffDate = nowLA . clone ( ) . subtract ( 1 , 'year' ) . format ( 'YYYY-MM-DD' ) ;
11541154 try {
11551155 const results = await userProfile . updateMany (
11561156 { } ,
You can’t perform that action at this time.
0 commit comments