@@ -3571,32 +3571,36 @@ static const char *oxcical_export_internal(const char *method, const char *tzid,
35713571 if (!ical_utc_to_datetime (ptz_component, start_time, &itime))
35723572 return " E-2221" ;
35733573 char tmp_buff[1024 ];
3574- if (b_allday && g_oxcical_allday_ymd && ptz_component != nullptr )
3574+ if (ptz_component == nullptr )
3575+ sprintf_dtutc (tmp_buff, std::size (tmp_buff), itime);
3576+ else if (b_allday && g_oxcical_allday_ymd)
35753577 sprintf_dt (tmp_buff, std::size (tmp_buff), itime);
3576- else if (ptz_component != nullptr )
3577- sprintf_dtlcl (tmp_buff, std::size (tmp_buff), itime);
35783578 else
3579- sprintf_dtutc (tmp_buff, std::size (tmp_buff), itime);
3579+ sprintf_dtlcl (tmp_buff, std::size (tmp_buff), itime);
35803580
35813581 auto &pilineDTS = pcomponent->append_line (" DTSTART" , tmp_buff);
3582- if (b_allday && g_oxcical_allday_ymd && ptz_component != nullptr )
3582+ if (ptz_component == nullptr )
3583+ /* nothing */ ;
3584+ else if (b_allday && g_oxcical_allday_ymd)
35833585 pilineDTS.append_param (" VALUE" , " DATE" );
3584- else if (ptz_component != nullptr )
3586+ else
35853587 pilineDTS.append_param (" TZID" , tzid);
35863588
35873589 if (start_time != end_time) {
35883590 if (!ical_utc_to_datetime (ptz_component, end_time, &itime))
35893591 return " E-2222" ;
3590- if (b_allday && g_oxcical_allday_ymd && ptz_component != nullptr )
3592+ if (ptz_component == nullptr )
3593+ sprintf_dtutc (tmp_buff, std::size (tmp_buff), itime);
3594+ else if (b_allday && g_oxcical_allday_ymd)
35913595 sprintf_dt (tmp_buff, std::size (tmp_buff), itime);
3592- else if (ptz_component != nullptr )
3593- sprintf_dtlcl (tmp_buff, std::size (tmp_buff), itime);
35943596 else
3595- sprintf_dtutc (tmp_buff, std::size (tmp_buff), itime);
3597+ sprintf_dtlcl (tmp_buff, std::size (tmp_buff), itime);
35963598 auto piline = &pcomponent->append_line (" DTEND" , tmp_buff);
3597- if (b_allday && g_oxcical_allday_ymd && ptz_component != nullptr )
3599+ if (ptz_component == nullptr )
3600+ /* nothing */ ;
3601+ else if (b_allday && g_oxcical_allday_ymd)
35983602 piline->append_param (" VALUE" , " DATE" );
3599- else if (ptz_component != nullptr )
3603+ else
36003604 piline->append_param (" TZID" , tzid);
36013605 }
36023606
0 commit comments