File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
frontend/src/Components/modals Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,16 @@ export const RescheduleClassEventModal = forwardRef(function (
8484 }
8585
8686 //reschedule logic
87- const dateStr = ( data . date as string ) . replace ( / - / g, '' ) ;
88- const timeStr = ( data . start_time as string ) . replace ( ':' , '' ) + '00' ;
89- const rescheduledRule = `DTSTART;TZID=${ user . timezone } :${ dateStr } T${ timeStr } \nRRULE:FREQ=DAILY;COUNT=1` ;
87+ const timeZoneStartDateTime = fromZonedTime (
88+ `${ data . date } T${ data . start_time } ` ,
89+ user . timezone
90+ ) ;
91+
92+ const rescheduledRule = new RRule ( {
93+ freq : RRule . DAILY ,
94+ count : 1 ,
95+ dtstart : timeZoneStartDateTime
96+ } ) . toString ( ) ;
9097 const duration = formatDuration (
9198 data . start_time as string ,
9299 data . end_time as string
You can’t perform that action at this time.
0 commit comments