Abstract_Meetings::format_date_for_zoom( string $start_date, string $start_time, string $time_zone )
Format the event start date for zoom.
Contents
Parameters
- $start_date
-
(string) (Required) The start date of the event.
- $start_time
-
(string) (Required) The start time of the event.
- $time_zone
-
(string) (Required) The timezone of the event.
Return
(string) The time formatted for Zoom using 'Y-m-dTH:i:sZ'.
Source
File: src/Tribe/Meetings/Zoom/Abstract_Meetings.php
public function format_date_for_zoom( $start_date, $start_time, $time_zone ) {
$timezone_object = Timezones::build_timezone_object( 'UTC' );
// Utilize the datepicker format when parse the Event Date to prevent the wrong date in Zoom.
$datepicker_format = Dates::datepicker_formats( tribe_get_option( 'datepickerFormat' ) );
$start_date_time = Dates::datetime_from_format( $datepicker_format, $start_date ) . ' ' . $start_time;
return Dates::build_date_object( $start_date_time, $time_zone )->setTimezone( $timezone_object )->format( 'Y-m-d\TH:i:s\Z' );
}
Changelog
| Version | Description |
|---|---|
| 1.2.0 | Introduced. |