Skip to content

Commit

Permalink
fix: timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
billyjacoby committed Oct 13, 2023
1 parent a4c0922 commit f1d2adc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/screens/CameraScreens/EventsScreen/EventsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export const EventsScreen = () => {
);
}}
/>
{/* // TODO: Get total event info and group by date. Add pagination heree */}
</View>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<BaseView key={recording.day}>
<SectionDateHeader title={dateString} />
Expand Down

0 comments on commit f1d2adc

Please sign in to comment.