Skip to content

Commit bdedfca

Browse files
authored
Merge pull request #336 from microsoftgraph/copilot/fix-github-actions-job-build-16-x
Synchronize date-fns upgrades with the lockfile
2 parents 609db17 + 70c70aa commit bdedfca

3 files changed

Lines changed: 19 additions & 23 deletions

File tree

‎graph-app/package-lock.json‎

Lines changed: 13 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎graph-app/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"@ng-bootstrap/ng-bootstrap": "^15.1.1",
2828
"@popperjs/core": "^2.11.8",
2929
"bootstrap": "^5.3.2",
30-
"date-fns": "^2.30.0",
31-
"date-fns-tz": "^2.0.0",
30+
"date-fns": "4.1.0",
31+
"date-fns-tz": "3.2.0",
3232
"rxjs": "^7.8.0",
3333
"tslib": "^2.6.2",
3434
"windows-iana": "^5.1.0",

‎graph-app/src/app/calendar/calendar.component.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import { Component, OnInit } from '@angular/core';
55
import { parseISO } from 'date-fns';
6-
import { endOfWeek, startOfWeek } from 'date-fns/esm';
7-
import { zonedTimeToUtc } from 'date-fns-tz';
6+
import { endOfWeek, startOfWeek } from 'date-fns';
7+
import { fromZonedTime } from 'date-fns-tz';
88
import { findIana } from 'windows-iana';
99
import * as MicrosoftGraph from '@microsoft/microsoft-graph-types';
1010

@@ -36,8 +36,8 @@ export class CalendarComponent implements OnInit {
3636
// but in UTC. For example, for Pacific Standard Time, the time value would be
3737
// 07:00:00Z
3838
const now = new Date();
39-
const weekStart = zonedTimeToUtc(startOfWeek(now), timeZone);
40-
const weekEnd = zonedTimeToUtc(endOfWeek(now), timeZone);
39+
const weekStart = fromZonedTime(startOfWeek(now), timeZone);
40+
const weekEnd = fromZonedTime(endOfWeek(now), timeZone);
4141

4242
this.events = await this.graphService.getCalendarView(
4343
weekStart.toISOString(),

0 commit comments

Comments
 (0)