setTimezone($serverTimezone); } catch (Exception $e) { return null; } } /** * Format date in order to send it to Klaviyo * * @return string * @see https://developers.klaviyo.com/en/docs/acceptable_date_and_timestamp_formats_for_profile_and_event_properties */ public function format(DateTime $date) { // ISO8601 return $date->format('Y-m-d\TH:i:sP'); } }