From f1d2adc1ee73862c537e06588f5c31862701db9a Mon Sep 17 00:00:00 2001 From: Billy Jacoby Date: Fri, 13 Oct 2023 18:07:13 -0400 Subject: [PATCH] fix: timezones --- src/screens/CameraScreens/EventsScreen/EventsScreen.tsx | 1 - .../CameraScreens/RecordingsScreen/RecordingsScreen.tsx | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/screens/CameraScreens/EventsScreen/EventsScreen.tsx b/src/screens/CameraScreens/EventsScreen/EventsScreen.tsx index 9d1bad6..b837d84 100644 --- a/src/screens/CameraScreens/EventsScreen/EventsScreen.tsx +++ b/src/screens/CameraScreens/EventsScreen/EventsScreen.tsx @@ -114,7 +114,6 @@ export const EventsScreen = () => { ); }} /> - {/* // TODO: Get total event info and group by date. Add pagination heree */} ); }; diff --git a/src/screens/CameraScreens/RecordingsScreen/RecordingsScreen.tsx b/src/screens/CameraScreens/RecordingsScreen/RecordingsScreen.tsx index a9b68da..1fda668 100644 --- a/src/screens/CameraScreens/RecordingsScreen/RecordingsScreen.tsx +++ b/src/screens/CameraScreens/RecordingsScreen/RecordingsScreen.tsx @@ -23,7 +23,11 @@ export const RecordingsScreen = () => { data={data} renderItem={({item: recording}) => { const date = new Date(recording.day); + const tzOffsetMinutes = date.getTimezoneOffset(); + + date.setUTCMinutes(tzOffsetMinutes); const dateString = date.toLocaleDateString(); + return (