Skip to content

Commit 4bb5b1b

Browse files
Copilotjasonjoh
andauthored
Sync date-fns upgrade with lockfile
Co-authored-by: jasonjoh <8966342+jasonjoh@users.noreply.github.com>
1 parent 73876a4 commit 4bb5b1b

3 files changed

Lines changed: 24 additions & 31 deletions

File tree

‎GraphRNSample/package-lock.json‎

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

‎GraphRNSample/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"@react-navigation/drawer": "^6.6.2",
1717
"@react-navigation/native": "^6.1.9",
1818
"@react-navigation/stack": "^6.3.20",
19-
"date-fns": "^2.30.0",
20-
"date-fns-tz": "^2.0.0",
19+
"date-fns": "4.1.0",
20+
"date-fns-tz": "3.2.0",
2121
"react": "18.2.0",
2222
"react-native": "0.71.7",
2323
"react-native-app-auth": "^6.4.3",

‎GraphRNSample/screens/CalendarScreen.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
import {createStackNavigator} from '@react-navigation/stack';
1616
import * as MicrosoftGraph from '@microsoft/microsoft-graph-types';
1717
import {endOfWeek, format, parseISO, startOfWeek} from 'date-fns';
18-
import {zonedTimeToUtc} from 'date-fns-tz';
18+
import {fromZonedTime} from 'date-fns-tz';
1919
import {findIana} from 'windows-iana';
2020

2121
import {UserContext} from '../UserContext';
@@ -91,11 +91,11 @@ export default class CalendarScreen extends React.Component {
9191
// time zone, but in UTC. For example, for PST, the time value
9292
// would be 07:00:00Z
9393
const now = new Date();
94-
const startDateTime = zonedTimeToUtc(
94+
const startDateTime = fromZonedTime(
9595
startOfWeek(now),
9696
ianaTimeZone,
9797
).toISOString();
98-
const endDateTime = zonedTimeToUtc(
98+
const endDateTime = fromZonedTime(
9999
endOfWeek(now),
100100
ianaTimeZone,
101101
).toISOString();

0 commit comments

Comments
 (0)